Detailed Description
This module provides API for manipulating time.
Examples
For examples, please see:
Define Documentation
#define PJ_TIME_VAL_ADD |
( |
|
t1, |
|
|
|
t2 | |
|
) |
| | |
Add t2 to t1 and store the result in t1. Effectively
this macro will expand as: (t1 += t2).
- Parameters:
-
| t1 | The time value to add. |
| t2 | The time value to be added to t1. |
#define PJ_TIME_VAL_EQ |
( |
|
t1, |
|
|
|
t2 | |
|
) |
| | |
This macro will check if t1 is equal to t2.
- Parameters:
-
| t1 | The first time value to compare. |
| t2 | The second time value to compare. |
- Returns:
- Non-zero if both time values are equal.
#define PJ_TIME_VAL_GT |
( |
|
t1, |
|
|
|
t2 | |
|
) |
| | |
This macro will check if t1 is greater than t2
- Parameters:
-
| t1 | The first time value to compare. |
| t2 | The second time value to compare. |
- Returns:
- Non-zero if t1 is greater than t2.
#define PJ_TIME_VAL_GTE |
( |
|
t1, |
|
|
|
t2 | |
|
) |
| | |
This macro will check if t1 is greater than or equal to t2
- Parameters:
-
| t1 | The first time value to compare. |
| t2 | The second time value to compare. |
- Returns:
- Non-zero if t1 is greater than or equal to t2.
#define PJ_TIME_VAL_LT |
( |
|
t1, |
|
|
|
t2 | |
|
) |
| | |
This macro will check if t1 is less than t2
- Parameters:
-
| t1 | The first time value to compare. |
| t2 | The second time value to compare. |
- Returns:
- Non-zero if t1 is less than t2.
#define PJ_TIME_VAL_LTE |
( |
|
t1, |
|
|
|
t2 | |
|
) |
| | |
This macro will check if t1 is less than or equal to t2.
- Parameters:
-
| t1 | The first time value to compare. |
| t2 | The second time value to compare. |
- Returns:
- Non-zero if t1 is less than or equal to t2.
#define PJ_TIME_VAL_MSEC |
( |
|
t |
) |
|
Get the total time value in miliseconds. This is the same as multiplying the second part with 1000 and then add the miliseconds part to the result.
- Parameters:
-
- Returns:
- Total time in miliseconds.
#define PJ_TIME_VAL_SUB |
( |
|
t1, |
|
|
|
t2 | |
|
) |
| | |
Substract t2 from t1 and store the result in t1. Effectively this macro will expand as (t1 -= t2).
- Parameters:
-
| t1 | The time value to subsctract. |
| t2 | The time value to be substracted from t1. |
Function Documentation
Get current time of day in local representation.
- Parameters:
-
| tv | Variable to store the result. |
- Returns:
- zero if successfull.
Parse time value into date/time representation.
- Parameters:
-
| tv | The time. |
| pt | Variable to store the date time result. |
- Returns:
- zero if successfull.
Encode date/time to time value.
- Parameters:
-
| pt | The date/time. |
| tv | Variable to store time value result. |
- Returns:
- zero if successfull.
Convert GMT to local time.
- Parameters:
-
- Returns:
- zero if successfull.
Convert local time to GMT.
- Parameters:
-
- Returns:
- zero if successfull.
Normalize the value in time value.
- Parameters:
-
| t | Time value to be normalized. |