Requires per-architecture support, and probably alsoĪrchitecture support for this flag in the vdso(7).ĬLOCK_MONOTONIC_RAW (since Linux 2.6.28 Linux-specific) When you need very fast, but not fine-grained timestamps. The time returned by consecutive calls will not goīackwards, but successive calls may-depending on theĪrchitecture-return identical (not-increased) time values.ĬLOCK_MONOTONIC_COARSE (since Linux 2.6.32 Linux-specific)Ī faster but less precise version of CLOCK_MONOTONIC. All CLOCK_MONOTONIC variants guarantee that This clock does not count time that the system is Jumps in the system time (e.g., if the systemĪdministrator manually changes the clock), but is affectedīy the incremental adjustments performed by adjtime(3) and The CLOCK_MONOTONIC clock is not affected by discontinuous Number of seconds that the system has been running since Time since-as described by POSIX-"some unspecified point The acronym TAI refers to International Atomic Time.Ī nonsettable system-wide clock that represents monotonic NTP inserting leap seconds as CLOCK_REALTIME does. This clock does notĮxperience discontinuities and backwards jumps caused by Support, and probably also architecture support for thisĬLOCK_TAI (since Linux 3.10 Linux-specific)Ī nonsettable system-wide clock derived from wall-clock SeeĬLOCK_REALTIME_COARSE (since Linux 2.6.32 Linux-specific)Ī faster but less precise version of CLOCK_REALTIME. Manually changes the clock), and by the incrementalĪdjustments performed by adjtime(3) and NTP.ĬLOCK_REALTIME_ALARM (since Linux 3.0 Linux-specific) ![]() In the system time (e.g., if the system administrator This clock is affected by discontinuous jumps Sufficiently recent versions of glibc and the Linux kernelĪ settable system-wide clock that measures real (i.e., The interpretation of theĬorresponding time values and the effect on timers is Timers for an absolute point in time are affected. When its time isĬhanged, timers for a relative interval are unaffected, but ![]() A clock may be system-wide and hence visible forĪll processes, or per-process if it measures time only within aĪll implementations support the system-wide real-time clock, The clockid argument is the identifier of the particular clock on The res and tp arguments are timespec(3) structures. Set the time of the specified clock clockid. The functions clock_gettime() and clock_settime() retrieve and ![]() If the time value pointed to by theĪrgument tp of clock_settime() is not a multiple of res, then it ![]() The resolution ofĬlocks depends on the implementation and cannot be configured byĪ particular process. In the struct timespec pointed to by res. The specified clock clockid, and, if res is non-NULL, stores it The function clock_getres() finds the resolution (precision) of SYNOPSIS top #include int clock_getres(clockid_t clockid, struct timespec *_Nullable res ) int clock_gettime(clockid_t clockid, struct timespec * tp ) int clock_settime(clockid_t clockid, const struct timespec * tp ) įeature Test Macro Requirements for glibc (seeĬlock_getres(), clock_gettime(), clock_settime(): Standard C library ( libc, -lc), since glibc 2.17īefore glibc 2.17, Real-time library ( librt, -lrt) Clock_getres(2) System Calls Manual clock_getres(2) NAME topĬlock_getres, clock_gettime, clock_settime - clock and time
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |