System clock
[Generic system services]

Detailed Description

This module provides an internal clock to other modules.

Time is internally represented as the number of seconds since January 1st, 1980 00:00:00 GMT.

The system clock uses GMT as its base. For display to the user, some local timezone information might be needed.


file  clock.c
 System clock implementation (license: GPLv2).
file  clock.h
 System clock header (license: GPLv2).

Data Structures

struct  clock_date_time
 Representation of human-readable date and time. More...


void clock_init ()
 Initializes the internal clock system.
uint32_t clock_get ()
 Retrieves current system time.
void clock_set (uint32_t timeval)
 Adjusts current system time.
void clock_interpret (uint32_t timeval, struct clock_date_time *date_time)
 Calculates a human-readable date and time representation.

Function Documentation

uint32_t clock_get (  ) 

Retrieves current system time.

The current system date and time in seconds.

void clock_set ( uint32_t  timeval  ) 

Adjusts current system time.

[in] timeval New date and time in seconds.

void clock_interpret ( uint32_t  timeval,
struct clock_date_time date_time 

Calculates a human-readable date and time representation.

[in] timeval The timestamp in seconds to represent.
[out] date_time A pointer to the structure which receives the human-readable representation.

Generated on Thu May 22 18:12:37 2008 for mega-eth by  doxygen 1.5.5