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.

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


Files

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...

Functions

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.

Returns:
The current system date and time in seconds.

void clock_set ( uint32_t  timeval  ) 

Adjusts current system time.

Parameters:
[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.

Parameters:
[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