Clock
A computer clock is a timekeeping mechanism or interface that provides time values or measures elapsed or processor time.
Rust in Action: Systems programming concepts and techniques
A system clock is the operating system's maintained representation of the current time, from which applications obtain time values.
- How it is used
- Uses the system clock as the application-facing time source in an NTP synchronization project.
- How deep it goes
- Explains clock hardware, boot timekeeping, and clock jumps, then demonstrates an OS-specific call to set time.
- Examples
- Uses a Raspberry Pi wildlife-monitoring device and a Rust settimeofday implementation to illustrate timekeeping and adjustment.
- What you can do after
- Operate/configure the system clock through an OS call and choose a monotonically increasing clock for time-sensitive applications.
Read how Rust in Action: Systems programming concepts and techniques explains clock →
Acing the CCNA Exam: Volume 2 Advanced Networking and Security
A software clock is the operating-system-maintained clock in a network device that tracks the current date and time.
- How it is used
- Supports accurate timestamps for security mechanisms, log correlation, troubleshooting, and network-device operation.
- How deep it goes
- Defines software and hardware clocks, supplies IOS commands, and verifies NTP synchronization with operational output.
- Examples
- Uses show clock detail, clock set, calendar set, clock timezone, and NTP association and status outputs.
- What you can do after
- Operate/configure a Cisco device clock, synchronize it with NTP, and verify its source, authority, and synchronization state.
Read how Acing the CCNA Exam: Volume 2 Advanced Networking and Security explains clock →
C++ Concurrency in Action, Second Edition
A C++ chrono clock is a class that provides a time source, a time-point type, a tick period, and information about whether it is steady.
- How it is used
- Supplies time readings for measuring elapsed work and calculating deadlines or timeouts.
- How deep it goes
- Defines clock properties, time-point relationships, and arithmetic, while noting that epochs are not directly queryable.
- Examples
- Uses system_clock::now(), a 500-nanosecond offset, and high_resolution_clock readings to illustrate clock use.
- What you can do after
- Apply std::chrono to read clock values, measure elapsed time, and calculate time-based deadlines.
Read how C++ Concurrency in Action, Second Edition explains clock →
Modern C
clock is a C standard library function that obtains processor time consumed by the program.
- How it is used
- Measures processor time consumed by the running program.
- How deep it goes
- Defines the function's purpose and prototype but does not explain timing units or conversion.
- Examples
- Shows the declaration clock_t clock(void).
- What you can do after
- Evaluate processor time consumed by a program using clock.
100 Go Mistakes and How to Avoid Them
A wall clock is a clock that represents the current time of day and may jump forward or backward when synchronized.
- How it is used
- Explains why wall-clock jumps and JSON round trips can produce surprising time behavior in Go programs.
- How deep it goes
- Distinguishes wall and monotonic clocks, traces JSON’s loss of monotonic data, and contrasts == with Equal.
- Examples
- Uses a time.Time JSON round trip, printed monotonic data, Equal, and Truncate(0) to expose comparison differences.
- What you can do after
- Diagnose misleading time.Time comparisons and choose Equal, Truncate(0), or monotonic timing appropriately.
Read how 100 Go Mistakes and How to Avoid Them explains clock →
Also covered in
- Learn C++ by Example
- Modern C, Third Edition
- Think Distributed Systems
- Learn Rust in a Month of Lunches
What to know first
- NTPThe Network Time Protocol is an Internet protocol that synchronizes computer clocks over packet-switched networks using reference time sources and timestamp exchanges.
Related concepts
- nowuses · A now operation or keyword yields or derives a value representing the current date or time according to a relevant clock or system.
- time_pointconfigured by · std::chrono::time_point is a C++ standard library class template representing a point in time relative to a clock's epoch, measured using a duration.
- monotonic clockcontrasts with · A monotonic clock is a time source whose readings never decrease and are suitable for measuring elapsed durations independently of wall-clock adjustments.
- NTPconfigured by · The Network Time Protocol is an Internet protocol that synchronizes computer clocks over packet-switched networks using reference time sources and timestamp exchanges.
- clock read-calendarconfigured by · clock read-calendar is a Cisco IOS privileged EXEC command that synchronizes the software clock to the hardware calendar.
Questions about clock
What is clock?
A computer clock is a timekeeping mechanism or interface that provides time values or measures elapsed or processor time.
Which Manning books explain clock?
Rust in Action: Systems programming concepts and techniques, Acing the CCNA Exam: Volume 2 Advanced Networking and Security, C++ Concurrency in Action, Second Edition, Modern C and 100 Go Mistakes and How to Avoid Them.
What should I know before learning clock?
Manning books that teach clock usually introduce atomic clock and NTP first.
What is the difference between clock and monotonic clock?
A computer clock is a timekeeping mechanism or interface that provides time values or measures elapsed or processor time. A monotonic clock is a time source whose readings never decrease and are suitable for measuring elapsed durations independently of wall-clock adjustments.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




