src/emu/attotime.h
| r12935 | r12936 | |
| 143 | 143 | static attotime from_msec(INT64 msec) { return attotime(msec / 1000, (msec % 1000) * (ATTOSECONDS_PER_SECOND / 1000)); } |
| 144 | 144 | static attotime from_usec(INT64 usec) { return attotime(usec / 1000000, (usec % 1000000) * (ATTOSECONDS_PER_SECOND / 1000000)); } |
| 145 | 145 | static attotime from_nsec(INT64 nsec) { return attotime(nsec / 1000000000, (nsec % 1000000000) * (ATTOSECONDS_PER_SECOND / 1000000000)); } |
| 146 | | static attotime from_hz(double frequency) { assert(frequency > 1); return attotime(0, double(ATTOSECONDS_PER_SECOND) / frequency); } |
| 146 | static attotime from_hz(double frequency) { assert(frequency >= 1); return attotime(0, double(ATTOSECONDS_PER_SECOND) / frequency); } |
| 147 | 147 | |
| 148 | 148 | // math |
| 149 | 149 | attotime &operator+=(const attotime &right); |