XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
time.h File Reference
#include <_xeneva.h>
#include <sys/types.h>
Include dependency graph for time.h:

Go to the source code of this file.

Classes

struct  tm
 
struct  _time_
 

Macros

#define US_PER_MS   1000
 
#define MS_PER_SEC   1000
 
#define SECS_PER_MIN   60
 
#define MINS_PER_HR   60
 
#define HRS_PER_DAY   24
 
#define DAYS_PER_YEAR   365
 
#define US_PER_SEC   (US_PER_MS * MS_PER_SEC)
 
#define US_PER_MIN   (US_PER_SEC * SECS_PER_MIN)
 
#define US_PER_HOUR   (US_PER_MIN * MINS_PER_HR)
 
#define MS_PER_MIN   (MS_PER_SEC * SECS_PER_MIN)
 
#define MS_PER_HR   (MS_PER_MIN * MINS_PER_HR)
 
#define MS_PER_DAY   (MS_PER_HOUR * HRS_PER_DAY)
 
#define SECS_PER_HR   (SECS_PER_MIN * MINS_PER_HR)
 
#define SECS_PER_DAY   (SECS_PER_HR * HRS_PER_DAY)
 
#define SECS_PER_YR   (SECS_PER_DAY * DAYS_PER_YEAR)
 
#define NULL   0
 

Typedefs

typedef struct _time_ timeval
 

Functions

XE_LIB char * asctime (const struct tm *)
 
XE_LIB clock_t clock (void)
 
XE_LIB char * ctime (const time_t)
 
XE_LIB double difftime (time_t, time_t)
 
XE_LIB struct tmgmtime (time_t)
 
XE_LIB time_t mktime (struct tm *)
 
XE_LIB time_t time (time_t *t)
 
XE_LIB int gettimeofday (timeval *val)
 

Macro Definition Documentation

◆ DAYS_PER_YEAR

#define DAYS_PER_YEAR   365

◆ HRS_PER_DAY

#define HRS_PER_DAY   24

◆ MINS_PER_HR

#define MINS_PER_HR   60

◆ MS_PER_DAY

#define MS_PER_DAY   (MS_PER_HOUR * HRS_PER_DAY)

◆ MS_PER_HR

#define MS_PER_HR   (MS_PER_MIN * MINS_PER_HR)

◆ MS_PER_MIN

#define MS_PER_MIN   (MS_PER_SEC * SECS_PER_MIN)

◆ MS_PER_SEC

#define MS_PER_SEC   1000

◆ NULL

#define NULL   0

◆ SECS_PER_DAY

#define SECS_PER_DAY   (SECS_PER_HR * HRS_PER_DAY)

◆ SECS_PER_HR

#define SECS_PER_HR   (SECS_PER_MIN * MINS_PER_HR)

◆ SECS_PER_MIN

#define SECS_PER_MIN   60

◆ SECS_PER_YR

#define SECS_PER_YR   (SECS_PER_DAY * DAYS_PER_YEAR)

◆ US_PER_HOUR

#define US_PER_HOUR   (US_PER_MIN * MINS_PER_HR)

◆ US_PER_MIN

#define US_PER_MIN   (US_PER_SEC * SECS_PER_MIN)

◆ US_PER_MS

#define US_PER_MS   1000

BSD 2-Clause License

Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ US_PER_SEC

#define US_PER_SEC   (US_PER_MS * MS_PER_SEC)

Typedef Documentation

◆ timeval

typedef struct _time_ timeval

Function Documentation

◆ asctime()

XE_LIB char * asctime ( const struct tm timeptr)

◆ clock()

XE_LIB clock_t clock ( void  )

◆ ctime()

XE_LIB char * ctime ( const time_t  timeSimple)

◆ difftime()

XE_LIB double difftime ( time_t  time1,
time_t  time0 
)

◆ gettimeofday()

XE_LIB int gettimeofday ( timeval val)

◆ gmtime()

XE_LIB struct tm * gmtime ( time_t  timeSimple)

◆ mktime()

XE_LIB time_t mktime ( struct tm timestruc)

◆ time()

XE_LIB time_t time ( time_t t)