-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtimestamp.h
37 lines (28 loc) · 887 Bytes
/
timestamp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef TIMESTAMP_H
#define TIMESTAMP_H
#include <QtCore/QMetaType>
#include <QtCore/QString>
#include <QtCore/QScopedPointer>
class Timestamp
{
public:
static int metaTypeId;
Timestamp();
Timestamp(const Timestamp &other);
~Timestamp();
static Timestamp fromString(const QString &text);
QString toString() const;
static Timestamp mix(const Timestamp &a, const Timestamp &b, qreal t);
Timestamp &operator=(const Timestamp &other);
int operator<=>(const Timestamp &other) const;
bool operator==(const Timestamp &other) const;
qint64 secsTo(const Timestamp &other) const;
qint64 msecsTo(const Timestamp &other) const;
qint64 usecsTo(const Timestamp &other) const;
qint64 nsecsTo(const Timestamp &other) const;
private:
class Private;
QScopedPointer<Private> d;
};
Q_DECLARE_METATYPE(Timestamp)
#endif // TIMESTAMP_H