Index: src/libcfa/time
===================================================================
--- src/libcfa/time	(revision 4c1b48f3439e509c602d91b69cea43e25b6e0f19)
+++ src/libcfa/time	(revision 8eb20182df0f0fc4e3c60614d569cdf2277d108e)
@@ -10,6 +10,6 @@
 // Created On       : Wed Mar 14 23:18:57 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar 28 18:03:08 2018
-// Update Count     : 568
+// Last Modified On : Sun Apr  1 20:03:16 2018
+// Update Count     : 581
 // 
 
@@ -31,7 +31,7 @@
 
 static inline void ?{}( timeval & t ) {}
-static inline void ?{}( timeval & t, time_t sec ) { t.tv_sec = sec; t.tv_usec = 0; }
 static inline void ?{}( timeval & t, time_t sec, suseconds_t usec ) { t.tv_sec = sec; t.tv_usec = usec; }
-static inline void ?{}( timeval & t, zero_t ) { t.tv_sec = 0; t.tv_usec = 0; }
+static inline void ?{}( timeval & t, time_t sec ) { t{ sec, 0 }; }
+static inline void ?{}( timeval & t, zero_t ) { t{ 0, 0 }; }
 static inline timeval ?=?( timeval & t, zero_t ) { return t{ 0 }; }
 static inline timeval ?+?( timeval & lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_usec + rhs.tv_usec }; }
@@ -44,7 +44,7 @@
 
 static inline void ?{}( timespec & t ) {}
-static inline void ?{}( timespec & t, time_t sec ) { t.tv_sec = sec; t.tv_nsec = 0; }
 static inline void ?{}( timespec & t, time_t sec, __syscall_slong_t nsec ) { t.tv_sec = sec; t.tv_nsec = nsec; }
-static inline void ?{}( timespec & t, zero_t ) { t.tv_sec = 0; t.tv_nsec = 0; }
+static inline void ?{}( timespec & t, time_t sec ) { t{ sec, 0}; }
+static inline void ?{}( timespec & t, zero_t ) { t{ 0, 0 }; }
 static inline timespec ?=?( timespec & t, zero_t ) { return t{ 0 }; }
 static inline timespec ?+?( timespec & lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_nsec + rhs.tv_nsec }; }
@@ -74,4 +74,5 @@
 static inline Duration ?=?( Duration & dur, zero_t ) { return dur{ 0 }; }
 
+#if 0
 static inline void ?{}( Duration & dur, timeval t ) with( dur ) {
 	tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * 1000;
@@ -91,6 +92,7 @@
 	return dur;
 } // ?=? timespec
-
-static inline int64_t nsecs( Duration dur ) with( dur ) { return tv; }
+#endif
+
+//static inline int64_t nsecs( Duration dur ) with( dur ) { return tv; }
 
 static inline Duration +?( Duration rhs ) with( rhs ) {	return (Duration)@{ +tv }; }
@@ -106,6 +108,6 @@
 static inline Duration ?*=?( Duration & lhs, int64_t rhs ) { lhs = lhs * rhs; return lhs; }
 
+static inline int64_t ?/?( Duration lhs, Duration rhs ) { return lhs.tv / rhs.tv; }
 static inline Duration ?/?( Duration lhs, int64_t rhs ) { return (Duration)@{ lhs.tv / rhs }; }
-static inline int64_t ?/?( Duration lhs, Duration rhs ) { return lhs.tv / rhs.tv; }
 static inline Duration ?/=?( Duration & lhs, int64_t rhs ) { lhs = lhs / rhs; return lhs; }
 
@@ -142,5 +144,5 @@
 static inline Duration ?`d ( double  days  ) { return (Duration)@{ days * (24LL * 3600LL * TIMEGRAN) }; }
 static inline Duration ?`w ( int64_t weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 3600LL * TIMEGRAN) }; }
-static inline Duration ?`f ( int64_t fortnight ) { return (Duration)@{ fortnight * (14LL * 24LL * 3600LL * TIMEGRAN) }; }
+//static inline Duration ?`f ( int64_t fortnight ) { return (Duration)@{ fortnight * (14LL * 24LL * 3600LL * TIMEGRAN) }; }
 
 static inline int64_t ?`ns ( Duration dur ) { return dur.tv; }
@@ -176,36 +178,32 @@
 };
 
-void mktime( Time & time, int year, int month, int day, int hour, int min, int sec, int nsec );
-
 static inline void ?{}( Time & t ) with( t ) {
 	tv = 0;
 } // Time
 
-static inline void ?{}( Time & time, int year, int month, int day, int hour, int min, int sec, int nsec ) {
-	mktime( time, year, month, day, hour, min, sec, nsec );
-} // Time
+void ?{}( Time & time, int year, int month, int day, int hour, int min, int sec, int nsec );
 
 static inline void ?{}( Time & time, int year, int month, int day, int hour, int min, int sec ) {
-	mktime( time, year, month, day, hour, min, sec, 0 );
+	time{ year, month, day, hour, min, sec, 0 };
 } // Time
 
 static inline void ?{}( Time & time, int year, int month, int day, int hour, int min ) {
-	mktime( time, year, month, day, hour, min, 0, 0 );
+	time{ year, month, day, hour, min, 0, 0 };
 } // Time
 
 static inline void ?{}( Time & time, int year, int month, int day, int hour ) {
-	mktime( time, year, month, day, hour, 0, 0, 0 );
+	time{ year, month, day, hour, 0, 0, 0 };
 } // Time
 
 static inline void ?{}( Time & time, int year, int month, int day ) {
-	mktime( time, year, month, day, 0, 0, 0, 0 );
+	time{ year, month, day, 0, 0, 0, 0 };
 } // Time
 
 static inline void ?{}( Time & time, int year, int month ) {
-	mktime( time, year, month, 0, 0, 0, 0, 0 );
+	time{ year, month, 0, 0, 0, 0, 0 };
 } // Time
 
 static inline void ?{}( Time & time, int year ) {
-	mktime( time, year, 0, 0, 0, 0, 0, 0 );
+	time{ year, 0, 0, 0, 0, 0, 0 };
 } // Time
 
@@ -293,6 +291,5 @@
 static inline void resetClock( Clock & clk, Duration adj ) with( clk ) {
 	clocktype = -1;
-	Duration tz = (timeval){ timezone, 0 };
-	offset = adj + tz;
+	offset = adj + timezone`s;							// timezone is (UTC - local time) in seconds
 } // resetClock
 
@@ -308,5 +305,5 @@
 	struct timespec res;
 	clock_getres( CLOCK_REALTIME_COARSE, &res );
-	return (Duration){ res };
+	return ((int64_t)res.tv_sec * TIMEGRAN + res.tv_nsec)`ns;
 } // getRes
 
Index: src/libcfa/time.c
===================================================================
--- src/libcfa/time.c	(revision 4c1b48f3439e509c602d91b69cea43e25b6e0f19)
+++ src/libcfa/time.c	(revision 8eb20182df0f0fc4e3c60614d569cdf2277d108e)
@@ -10,6 +10,6 @@
 // Created On       : Tue Mar 27 13:33:14 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Mar 27 16:37:35 2018
-// Update Count     : 18
+// Last Modified On : Sun Apr  1 17:30:08 2018
+// Update Count     : 21
 // 
 
@@ -49,5 +49,5 @@
 #endif // __CFA_DEBUG__
 
-void mktime( Time & time, int year, int month, int day, int hour, int min, int sec, int nsec ) with( time ) {
+void ?{}( Time & time, int year, int month, int day, int hour, int min, int sec, int nsec ) with( time ) {
 	tm tm;
 
@@ -81,5 +81,5 @@
 	} // if
 #endif // __CFA_DEBUG__
-} // mktime
+} // ?{}
 
 char * yy_mm_dd( Time time, char * buf ) with( time ) {
