source: rtems/cpukit/score/src/ts64totimespec.c @ e57cb3c

4.104.115
Last change on this file since e57cb3c was e57cb3c, checked in by Joel Sherrill <joel.sherrill@…>, on 12/09/08 at 21:27:35

2008-12-09 Joel Sherrill <joel.sherrill@…>

  • score/Makefile.am, score/preinstall.am, score/include/rtems/score/timespec.h, score/include/rtems/score/timestamp.h: Add 64-bit implementation of SuperCore? Timestamps. Tested on PowerPC/psim and SPARC/sis.
  • score/include/rtems/score/timestamp64.h, score/src/ts64addto.c, score/src/ts64divide.c, score/src/ts64dividebyinteger.c, score/src/ts64equalto.c, score/src/ts64getnanoseconds.c, score/src/ts64getseconds.c, score/src/ts64greaterthan.c, score/src/ts64lessthan.c, score/src/ts64set.c, score/src/ts64settozero.c, score/src/ts64subtract.c, score/src/ts64toticks.c, score/src/ts64totimespec.c: New files.
  • Property mode set to 100644
File size: 755 bytes
Line 
1/**
2 * @file score/src/ts64totimespec.c
3*/
4
5/*
6 *  COPYRIGHT (c) 1989-2008.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#if HAVE_CONFIG_H
17#include "config.h"
18#endif
19
20#include <sys/types.h>
21
22#include <rtems/system.h>
23#include <rtems/score/timestamp.h>
24
25#if defined(CPU_RTEMS_SCORE_TIMESTAMP_IS_INT64) && \
26    !defined(CPU_RTEMS_SCORE_TIMESTAMP_INT64_INLINE)
27void _Timestamp64_To_timespec(
28  Timestamp64_Control *_timestamp,
29  struct timespec     *_timespec
30)
31{
32  _timespec->tv_sec = *_timestamp / 1000000000;
33  _timespec->tv_nsec = *_timestamp % 1000000000;
34}
35#endif
Note: See TracBrowser for help on using the repository browser.