source: rtems/cpukit/score/src/coretodsecondssinceepoch.c @ 2369b10

4.115
Last change on this file since 2369b10 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 699 bytes
Line 
1/*
2 * Copyright (c) 2013 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#if HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#include <rtems/score/todimpl.h>
20
21uint32_t _TOD_Seconds_since_epoch( void )
22{
23  TOD_Control      *tod = &_TOD;
24  ISR_lock_Context  lock_context;
25  Timestamp_Control now;
26
27  _TOD_Acquire( tod, &lock_context );
28   now = tod->now;
29  _TOD_Release( tod, &lock_context );
30
31  return _Timestamp_Get_seconds( &now );
32}
Note: See TracBrowser for help on using the repository browser.