URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [exec/] [posix/] [src/] [posixintervaltotimespec.c] - Rev 158
Go to most recent revision | Compare with Previous | Blame | View Log
/* * $Id: posixintervaltotimespec.c,v 1.1.1.1 2001-07-10 09:42:54 chris Exp $ */ #include <assert.h> #include <time.h> #include <errno.h> #include <rtems/system.h> #include <rtems/score/isr.h> #include <rtems/score/thread.h> #include <rtems/score/tod.h> #include <rtems/posix/seterr.h> #include <rtems/posix/time.h> /*PAGE * * _POSIX_Interval_to_timespec */ void _POSIX_Interval_to_timespec( Watchdog_Interval ticks, struct timespec *time ) { unsigned32 usecs; usecs = ticks * _TOD_Microseconds_per_tick; time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * TOD_NANOSECONDS_PER_MICROSECOND; }
Go to most recent revision | Compare with Previous | Blame | View Log