mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
LibC: Implement clock() and add CLOCKS_PER_SEC define.
This commit is contained in:
parent
a182ea8c60
commit
f015798af9
2 changed files with 11 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/times.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <Kernel/Syscall.h>
|
||||
|
@ -110,4 +111,11 @@ void tzset()
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
clock_t clock()
|
||||
{
|
||||
struct tms tms;
|
||||
times(&tms);
|
||||
return tms.tms_utime + tms.tms_stime;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue