logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

binuptime, getbinuptime, microuptime, getmicrouptime, nanouptime, getnanouptime, sbinuptime,

Authors

       This manual page was written by Kelly Yancey <kbyanc@posi.net>.

Debian                                          February 21, 2015                                 MICROUPTIME(9)

Description

       The binuptime() and getbinuptime() functions store the time elapsed since boot as a structbintime at the
       address specified by bt.  The microuptime() and getmicrouptime() functions perform the same utility,  but
       record  the  elapsed  time  as  a structtimeval instead.  Similarly the nanouptime() and getnanouptime()
       functions store the elapsed time as a structtimespec.  The sbinuptime()  and  getsbinuptime()  functions
       return the time elapsed since boot as a sbintime_t.

       The  binuptime(), microuptime(), nanouptime(), and sbinuptime() functions always query the timecounter to
       return  the  current  time  as  precisely  as  possible.    Whereas   getbinuptime(),   getmicrouptime(),
       getnanouptime(),  and  getsbinuptime() functions are abstractions which return a less precise, but faster
       to obtain, time.

       The intent of the getbinuptime(), getmicrouptime(), getnanouptime(), and getsbinuptime() functions is  to
       enforce the user's preference for timer accuracy versus execution time.

Name

       binuptime,    getbinuptime,   microuptime,   getmicrouptime,   nanouptime,   getnanouptime,   sbinuptime,
       getsbinuptime — get the time elapsed since boot

See Also

bintime(9), get_cyclecount(9), getbintime(9), getmicrotime(9), getnanotime(9), microtime(9), nanotime(9),
       tvtohz(9)

Synopsis

#include<sys/time.h>voidbinuptime(structbintime*bt);

       voidgetbinuptime(structbintime*bt);

       voidmicrouptime(structtimeval*tv);

       voidgetmicrouptime(structtimeval*tv);

       voidnanouptime(structtimespec*ts);

       voidgetnanouptime(structtimespec*tsp);

       sbintime_tsbinuptime(void);

       sbintime_tgetsbinuptime(void);

See Also