include/time.h: merged

- Defining CLOCKS_PER_SEC = 100, instead of 60.
   This define is here for legacy reasons, use sysconf(_SC_CLK_TCK) to
   retrieve the actual number of clock tick per second of the system in
   new code.

 - Moving stime prototype to minix/sysutil.h

Change-Id: I76a73cd53ac2361845f2917f62af4125adfc615d
This commit is contained in:
2013-12-03 11:51:21 +01:00
parent f7cf297602
commit 57476292b0
5 changed files with 11 additions and 26 deletions

View File

@@ -73,6 +73,8 @@ void ser_putc(char c);
void get_randomness(struct k_randomness *, int);
u32_t sqrt_approx(u32_t);
int stime(time_t *_top);
#define asynsend(ep, msg) asynsend3(ep, msg, 0)
int asynsend3(endpoint_t ep, message *msg, int flags);
int asyn_geterror(endpoint_t *dst, message *msg, int *err);

View File

@@ -70,11 +70,7 @@ typedef _BSD_TIMER_T_ timer_t;
#undef _BSD_TIMER_T_
#endif
#ifdef __minix
#define CLOCKS_PER_SEC 60
#else
#define CLOCKS_PER_SEC 100
#endif
struct tm {
int tm_sec; /* seconds after the minute [0-61] */
@@ -210,10 +206,6 @@ size_t strftime_z(const timezone_t, char * __restrict, size_t,
#endif /* _NETBSD_SOURCE */
#ifdef __minix
int stime(time_t *_top);
#endif /* __minix */
__END_DECLS
#endif /* !_TIME_H_ */