Added a difftime() implementation (for 32 bit time_t).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8328 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0718113e06
commit
c1b52847e2
@ -3,6 +3,7 @@ SubDir OBOS_TOP src kernel libroot posix time ;
|
||||
KernelMergeObject posix_time.o :
|
||||
<$(SOURCE_GRIST)>asctime.c
|
||||
<$(SOURCE_GRIST)>ctime.c
|
||||
<$(SOURCE_GRIST)>difftime.c
|
||||
<$(SOURCE_GRIST)>localtime.c
|
||||
<$(SOURCE_GRIST)>mktime.c
|
||||
<$(SOURCE_GRIST)>time.c
|
||||
|
16
src/kernel/libroot/posix/time/difftime.c
Normal file
16
src/kernel/libroot/posix/time/difftime.c
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
*/
|
||||
|
||||
|
||||
#include <time.h>
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
double
|
||||
difftime(time_t time1, time_t time2)
|
||||
{
|
||||
return 1. * ((bigtime_t)time1 - (bigtime_t)time2);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user