WU Trading Library 0.2.0
A backtesting and trading strategy library
Loading...
Searching...
No Matches
timeutils.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  WU_TimeStamp
 A timestamp represent a mark in time given relative to unix epoch. More...

Enumerations

enum  WU_TimeUnit { WU_TIME_UNIT_SECONDS = 0 , WU_TIME_UNIT_MILLIS = 1 , WU_TIME_UNIT_MICROS = 2 , WU_TIME_UNIT_NANOS = 3 }
 WU_TimeUnit represents a unit of time used for time-based calculations such as time-weighted returns or time-based aggregations. More...

Functions

double wu_annualization_factor (WU_TimeUnit unit)
 Returns the number of units (seconds, millis, micros, or nanos) contained in a year.

Enumeration Type Documentation

◆ WU_TimeUnit

WU_TimeUnit represents a unit of time used for time-based calculations such as time-weighted returns or time-based aggregations.

Enumerator
WU_TIME_UNIT_SECONDS 
WU_TIME_UNIT_MILLIS 
WU_TIME_UNIT_MICROS 
WU_TIME_UNIT_NANOS 

Definition at line 10 of file timeutils.h.

Function Documentation

◆ wu_annualization_factor()

double wu_annualization_factor ( WU_TimeUnit unit)

Returns the number of units (seconds, millis, micros, or nanos) contained in a year.

Definition at line 3 of file timeutils.c.