- Main Page
- Data Structures
- Files
- Directories

- Search for |

- File List
- Globals

# time.h File Reference

`#include <ubixos/types.h>`
`#include <sys/io.h>`

Include dependency graph for time.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | timespec
struct | timeStruct
struct | timeval
struct | timezone
## Defines
#define | BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10)
#define | DAY (24*HOUR)
#define | HOUR (60*MINUTE)
#define | MINUTE 60
#define | YEAR (365*DAY)
## Typedefs
typedef long | suseconds_t
typedef __time_t | time_t
## Functions
int | gettimeofday (struct timeval *tp, struct timezone *tzp)
int | time_init ()
uInt32 | timeMake (struct timeStruct *time)

## Define Documentation

#define BCD_TO_BIN | ( | val |  | ) | ((val)=((val)&15) + ((val)>>4)*10)

Definition at line 38 of file time.h.

Referenced by time_init().

#define DAY (24*HOUR)

Definition at line 42 of file time.h.

Referenced by timeMake().

#define HOUR (60*MINUTE)

Definition at line 41 of file time.h.

Referenced by timeMake().

#define MINUTE 60

Definition at line 40 of file time.h.

Referenced by timeMake().

#define YEAR (365*DAY)

Definition at line 43 of file time.h.

Referenced by timeMake().

## Typedef Documentation

typedef long suseconds_t

Definition at line 36 of file time.h.

typedef __time_t time_t

Definition at line 46 of file time.h.

## Function Documentation

int gettimeofday | ( | struct timeval * | tp,
|  | struct timezone * | tzp |
| ) |  |  |

Definition at line 110 of file time.c.

References timeval::tv_sec, and timeval::tv_usec.

int time_init | ( |  | ) |

Definition at line 56 of file time.c.

References BCD_TO_BIN, timeStruct::day, timeStruct::hour, kprintf(), timeStruct::min, timeStruct::mon, timeStruct::sec, systemVitals, timeCmosRead(), timeMake(), vitalsStruct::timeStart, and timeStruct::year.

Here is the call graph for this function:

uInt32 timeMake | ( | struct timeStruct * | time | ) |

Definition at line 92 of file time.c.

References DAY, timeStruct::day, HOUR, timeStruct::hour, timeStruct::min, MINUTE, timeStruct::mon, month, timeStruct::sec, timeStruct::year, and YEAR.

Referenced by time_init().