upipe/uclock.h header reference
structure provided by the application to retrieve system time More
Header inclusion
Members
Type
- struct uclock
Functions
- uint64_t uclock_from_real(struct uclock *uclock, uint64_t real)
- uint64_t uclock_now(struct uclock *uclock)
- void uclock_release(struct uclock *uclock)
- uint64_t uclock_to_real(struct uclock *uclock, uint64_t systime)
- struct uclock * uclock_use(struct uclock *uclock)
Description
structure provided by the application to retrieve system time
Members detail
This macro is declared in upipe/uclock.h source file, line 44.
This macro is declared in upipe/uclock.h source file, line 31.
This struct is declared in upipe/uclock.h source file, line 48.
This struct is a structure allowing to retrieve system time.
Field | Description |
---|---|
struct urefcount * refcount; | pointer to refcount management structure |
uint64_t (*uclock_now)(struct uclock *) ; | function returning the current system time |
uint64_t (*uclock_to_real)(struct uclock *, uint64_t ) ; | function converting a system time to Epoch-based real time |
uint64_t (*uclock_from_real)(struct uclock *, uint64_t ) ; | function converting Epoch-based real time to system time |
uint64_t uclock_from_real(struct uclock *uclock, uint64_t real)
This function is declared in upipe/uclock.h source file, line 94.
This function converts Epoch-based real time (from * 1970-01-01 00:00:00 +0000) to real time. The scale has to be passed in units of UCLOCK_FREQ.
Parameter list:
- uclock: pointer to uclock
- real: number of ticks since the Epoch
The return value is system time in 27 MHz ticks, or UINT64_MAX if unsupported
uint64_t uclock_now(struct uclock *uclock)
This function is declared in upipe/uclock.h source file, line 67.
This function returns the current system time.
Parameter list:
- uclock: pointer to uclock
The return value is current system time in 27 MHz ticks, or UINT64_MAX in case of error
void uclock_release(struct uclock *uclock)
This function is declared in upipe/uclock.h source file, line 118.
This function decrements the reference count of a uclock or frees it.
Parameter list:
- uclock: pointer to uclock
uint64_t uclock_to_real(struct uclock *uclock, uint64_t systime)
This function is declared in upipe/uclock.h source file, line 80.
This function converts a system time to Epoch-based real time (from 1970-01-01 00:00:00 +0000). The scale is in units of UCLOCK_FREQ, divide by it to get standard time_t.
Parameter list:
- uclock: pointer to uclock
- systime: system time in 27 MHz ticks
The return value is number of ticks since the Epoch, or UINT64_MAX if unsupported
This function is declared in upipe/uclock.h source file, line 106.
This function increments the reference count of a uclock.
Parameter list:
- uclock: pointer to uclock
The return value is same pointer to uclock