interim commit
This commit is contained in:
parent
2aa72ba49b
commit
277023a9c7
@ -39,14 +39,14 @@ typedef struct ase_btime_t ase_btime_t;
|
||||
|
||||
struct ase_btime_t
|
||||
{
|
||||
int sec;
|
||||
int min; /* 0 to 59 */
|
||||
int hour; /* 0 to 23 */
|
||||
int mday; /* 1 to 31 */
|
||||
int mon; /* 0 to 11 */
|
||||
int sec; /* 0-61 */
|
||||
int min; /* 0-59 */
|
||||
int hour; /* 0-23 */
|
||||
int mday; /* 1-31 */
|
||||
int mon; /* 0(jan)-11(dec) */
|
||||
int year; /* the number of years since 1900 */
|
||||
int wday; /* 0(sunday) to 6(saturday) */
|
||||
int yday; /* 0 to 365 */
|
||||
int wday; /* 0(sun)-6(sat) */
|
||||
int yday; /* 0(jan 1) to 365 */
|
||||
int isdst;
|
||||
};
|
||||
|
||||
|
@ -81,6 +81,21 @@ int ase_settime (ase_ntime_t t)
|
||||
tv.tv_sec = t / ASE_MSEC_IN_SEC;
|
||||
tv.tv_usec = (t % ASE_MSEC_IN_SEC) * ASE_USEC_IN_MSEC;
|
||||
|
||||
/*
|
||||
#if defined CLOCK_REALTIME && HAVE_CLOCK_SETTIME
|
||||
{
|
||||
int r = clock_settime (CLOCK_REALTIME, ts);
|
||||
if (r == 0 || errno == EPERM)
|
||||
return r;
|
||||
}
|
||||
#elif HAVE_STIME
|
||||
/* This fails to compile on OSF1 V5.1, due to stime requiring
|
||||
a `long int*' and tv_sec is `int'. But that system does provide
|
||||
settimeofday. */
|
||||
return stime (&ts->tv_sec);
|
||||
#else
|
||||
*/
|
||||
|
||||
#ifdef SYS_settimeofday
|
||||
n = syscall (SYS_settimeofday, &tv, ASE_NULL);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user