source: rtems/cpukit/score/src/timespecgetasnanoseconds.c @ 0daa8ab

5
Last change on this file since 0daa8ab was 7cd2484, checked in by Alexander Krutwig <alexander.krutwig@…>, on 05/12/15 at 12:32:47

timecounter: Use in RTEMS

Replace timestamp implementation with FreeBSD bintime and timecounters.

New test sptests/sptimecounter02.

Update #2271.

  • Property mode set to 100644
File size: 559 bytes
Line 
1/**
2 *  @file
3 *
4 *  @brief Get As Nanoseconds
5 *  @ingroup Timespec
6 */
7
8/*
9 *  COPYRIGHT (c) 2013 Chris Johns <chrisj@rtems.org>
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.org/license/LICENSE.
14 */
15
16#if HAVE_CONFIG_H
17#include "config.h"
18#endif
19
20#include <rtems/score/timespec.h>
21#include <rtems/score/todimpl.h>
22
23uint64_t _Timespec_Get_as_nanoseconds(
24  const struct timespec *time
25)
26{
27  return ( ((uint64_t) time->tv_sec) * 1000000000ULL ) + time->tv_nsec;
28}
Note: See TracBrowser for help on using the repository browser.