Clock
A computer clock is a timekeeping source or interface that provides time values or measurements to software.
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
- Provides the operating system’s current-time values to applications and serves as the clock adjusted during time synchronization.
- How deep it goes
- Defines the clock, explains its hardware relationship and jumps, and outlines OS-specific setting; the shown libc call omits success checking.
- Examples
- Uses a Raspberry Pi starting at the epoch and a Rust libc::settimeofday implementation to make clock behavior concrete.
- What you can do after
- Build it from scratch: create an NTP client and set system time through OS-specific calls while accounting for clock jumps.
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 →
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.
- 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.
- 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.
- system_clockincludes · std::chrono::system_clock is a C++ standard-library clock that represents system-wide wall-clock time and can be converted to and from calendar time.
- timestampproduces · A timestamp is a value representing a specific point in time, typically associated with an event, observation, or data item.
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.




