1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Ensured that Times start life in their simplest form.

This commit is contained in:
Thomas Harte 2016-12-24 15:18:03 -05:00
parent 4728bda0a2
commit 4d4852bb78

View File

@ -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();
}
/*!