Browse Source

timex: introduce USEC_IN_NS constant

cc430
Martine Lenders 7 years ago
parent
commit
cffdb1c8e2
  1. 5
      sys/include/timex.h
  2. 2
      sys/posix/semaphore/posix_semaphore.c

5
sys/include/timex.h

@ -43,6 +43,11 @@ extern "C" {
*/
#define MS_IN_USEC (1000U)
/**
* @brief The number of nanoseconds per microsecond
*/
#define USEC_IN_NS (1000)
/**
* @brief The maximum length of the string representation of a timex timestamp
*/

2
sys/posix/semaphore/posix_semaphore.c

@ -32,8 +32,6 @@
#include "semaphore.h"
#define USEC_IN_NS (1000)
int sem_timedwait(sem_t *sem, const struct timespec *abstime)
{
timex_t now, timeout = { abstime->tv_sec, abstime->tv_nsec / USEC_IN_NS };

Loading…
Cancel
Save