Mercurial > hg > svcore
diff base/RealTime.h @ 26:090c22aa726a
* Add the Note layer for pianoroll-type display of note-type data
* Complete the MIDI file importer (well, nearly -- it would be nice to
be able to import the non-note data as other sorts of models, and that's
not done yet).
* Minor refactoring in RealTime etc
author | Chris Cannam |
---|---|
date | Fri, 10 Feb 2006 17:51:36 +0000 |
parents | 2fb933f88604 |
children | 39ae3dee27b9 |
line wrap: on
line diff
--- a/base/RealTime.h Thu Feb 09 18:01:52 2006 +0000 +++ b/base/RealTime.h Fri Feb 10 17:51:36 2006 +0000 @@ -19,6 +19,9 @@ #include <iostream> #include <string> +struct timeval; + + /** * RealTime represents time values to nanosecond precision * with accurate arithmetic and frame-rate conversion functions. @@ -38,6 +41,10 @@ RealTime(const RealTime &r) : sec(r.sec), nsec(r.nsec) { } + static RealTime fromSeconds(double sec); + static RealTime fromMilliseconds(int msec); + static RealTime fromTimeval(const struct timeval &); + RealTime &operator=(const RealTime &r) { sec = r.sec; nsec = r.nsec; return *this; }