⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 posixintervaltotimespec.c

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻 C
字号:
/* *  $Id: posixintervaltotimespec.c,v 1.3 2001/01/24 14:17:28 joel Exp $ */#if HAVE_CONFIG_H#include "config.h"#endif#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/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;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -