2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 Returns time passed since start of program.
8 #include "__arosc_privdata.h"
11 #include <proto/dos.h>
12 #include <aros/symbolsets.h>
14 /*****************************************************************************
25 clock() returns an approximation of the time passed since
26 the program was started
31 The time passed in CLOCKS_PER_SEC units. To get the
32 number of seconds divide by CLOCKS_PER_SEC.
35 This function must not be used in a shared library or
36 in a threaded application.
47 ******************************************************************************/
49 struct aroscbase
*aroscbase
= __aros_getbase_aroscbase();
51 return (clock_t)time(NULL
) - aroscbase
->acb_starttime
;
54 int __init_clock(struct aroscbase
*aroscbase
)
56 aroscbase
->acb_starttime
= (clock_t)time(NULL
);
61 ADD2OPENLIB(__init_clock
, 20);