mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Ensured that Time
s start life in their simplest form.
This commit is contained in:
parent
4728bda0a2
commit
4d4852bb78
@ -25,15 +25,17 @@ struct Time {
|
||||
Time() : length(0), clock_rate(1) {}
|
||||
Time(unsigned int unsigned_int_value) : length(unsigned_int_value), clock_rate(1) {}
|
||||
Time(int int_value) : Time((unsigned int)int_value) {}
|
||||
Time(unsigned int length, unsigned int clock_rate) : length(length), clock_rate(clock_rate) {}
|
||||
Time(unsigned int length, unsigned int clock_rate) : length(length), clock_rate(clock_rate) { simplify(); }
|
||||
Time(int length, int clock_rate) : Time((unsigned int)length, (unsigned int)clock_rate) {}
|
||||
Time(uint64_t length, uint64_t clock_rate)
|
||||
{
|
||||
install_result(length, clock_rate);
|
||||
simplify();
|
||||
}
|
||||
Time(float value)
|
||||
{
|
||||
install_float(value);
|
||||
simplify();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user