[Cialug] Seconds only timestamp

Morris Dovey mrdovey at iedu.com
Wed Jun 18 14:55:23 CDT 2014


Do you not have a time() function?

#include <stdio.h>
#include <time.h>
int main(void)
{  printf("%llu\n",(unsigned long long)time(NULL));
    return 0;
}

On 6/15/14 6:52 PM, Brian Wood wrote:
> Is there an api that returns just the number of seconds?  Currently
> I'm using clock_gettime and  CLOCK_REALTIME_COARSE.  The
> docs say that CLOCK_REALTIME_COARSE is;
>
> "A faster but less precise version of CLOCK_REALTIME."
>
> I don't know how coarse it is, but I only care about the seconds.


More information about the Cialug mailing list