This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 06/12] Use clock_gettime to implement time.


On 8/20/19 2:02 PM, Adhemerval Zanella wrote:
>>  /* Return the time now, and store it in *TIMER if not NULL.  */
>>  time_t
>>  time (time_t *timer)
>>  {
>> -  __set_errno (ENOSYS);
>> +  struct timespec ts;
>> +  time_t res;
>>  
>> -  if (timer != NULL)
>> -    *timer = (time_t) -1;
>> -  return (time_t) -1;
>> +  if (__clock_gettime (CLOCK_REALTIME, &ts))
> 
> No implicit check. Also I think we can assume CLOCK_REALTIME support on
> all current architectures (including Hurd), so there is no actually need
> to check clock_gettime return value.

OK, will change.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]