blob: 96b4f64467ba49d41fb37a168bd4250971a4406d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/**
* @file
*
* @ingroup RTEMSScoreTimespec
*
* @brief This source file contains the implementation of
* _Timespec_Get_as_nanoseconds().
*/
/*
* COPYRIGHT (c) 2013 Chris Johns <chrisj@rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/score/timespec.h>
#include <rtems/score/todimpl.h>
uint64_t _Timespec_Get_as_nanoseconds(
const struct timespec *time
)
{
return ( ((uint64_t) time->tv_sec) * 1000000000ULL ) + time->tv_nsec;
}
|