[Cialug] Seconds only timestamp

Scott Yates Scott at yatesframe.com
Wed Jun 18 14:57:24 CDT 2014


Can you not parse out what you need?  If it returns a struct, then this
would seem to be a non issue.


On Wed, Jun 18, 2014 at 2:55 PM, Morris Dovey <mrdovey at iedu.com> wrote:

> 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.
>>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>


More information about the Cialug mailing list