aboutsummaryrefslogtreecommitdiffstats
path: root/lib/psitime.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/psitime.cc')
-rw-r--r--lib/psitime.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/psitime.cc b/lib/psitime.cc
index 11e16e0..bb4ea78 100644
--- a/lib/psitime.cc
+++ b/lib/psitime.cc
@@ -43,6 +43,14 @@ PsiTime::PsiTime(struct timeval *_utv = 0L, struct timezone *_utz = 0L) {
unix2psi();
}
+PsiTime::PsiTime(const PsiTime &t) {
+ utv = t.utv;
+ utz = t.utz;
+ ptv = t.ptv;
+ ptz = t.ptz;
+ ptzValid = t.ptzValid;
+}
+
PsiTime::~PsiTime() {
}
@@ -104,6 +112,15 @@ const unsigned long PsiTime::getPsiTimeHi(void) {
return ptv.tv_high;
}
+PsiTime &PsiTime::operator=(const PsiTime &t) {
+ utv = t.utv;
+ utz = t.utz;
+ ptv = t.ptv;
+ ptz = t.ptz;
+ ptzValid = t.ptzValid;
+ return *this;
+}
+
ostream &operator<<(ostream &s, const PsiTime &t) {
const char *fmt = "%c";
char buf[100];