/builddir/build/BUILD/gru-0.1.0/src/time/gru_duration.h File Reference
#include <math.h>
#include <stdlib.h>
#include <sys/time.h>
#include "common/gru_portable.h"
#include "gru_time_utils.h"
Go to the source code of this file.
Typedef Documentation
Function Documentation
gru_export gru_duration_t gru_duration_from_minutes |
( |
uint64_t |
minutes |
) |
|
Builds a duration struct that represents a duration.
That means, the current time + the given number of minutes
- Parameters:
-
| minutes | the duration in minutes |
- Returns:
- a duration object
gru_export gru_duration_t gru_duration_from_seconds |
( |
uint64_t |
seconds |
) |
|
Builds a duration struct that represents a duration.
That means, the current time + the given number of seconds
- Parameters:
-
| seconds | the duration in seconds |
- Returns:
- a duration object
gru_export uint64_t gru_duration_minutes |
( |
gru_duration_t |
duration, |
|
|
double * |
fractional | |
|
) |
| | |
Given a duration object, return the number of minutes between its start and end time.
- Parameters:
-
| duration | a duration object to calculate |
- Returns:
- the time difference in minutes
Given a duration object, return the number of seconds between its start and end time.
- Parameters:
-
| duration | a duration object to calculate |
- Returns:
- the time difference in seconds