Index: libcfa/src/clock.hfa
===================================================================
--- libcfa/src/clock.hfa	(revision 7006ba58edfad29340faefc4f3cd491ea4ff94d8)
+++ 	(revision )
@@ -1,96 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// clock --
-//
-// Author           : Peter A. Buhr
-// Created On       : Thu Apr 12 14:36:06 2018
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jun 13 21:21:13 2019
-// Update Count     : 8
-//
-
-#include <time.hfa>
-
-
-//######################### C time #########################
-
-static inline char * ctime( time_t tp ) { char * buf = ctime( &tp ); buf[24] = '\0'; return buf; }
-static inline char * ctime_r( time_t tp, char * buf ) { ctime_r( &tp, buf ); buf[24] = '\0'; return buf; }
-static inline tm * gmtime( time_t tp ) { return gmtime( &tp ); }
-static inline tm * gmtime_r( time_t tp, tm * result ) { return gmtime_r( &tp, result ); }
-static inline tm * localtime( time_t tp ) { return localtime( &tp ); }
-static inline tm * localtime_r( time_t tp, tm * result ) { return localtime_r( &tp, result ); }
-
-
-//######################### Clock #########################
-
-struct Clock {											// private
-	Duration offset;									// for virtual clock: contains offset from real-time
-	int clocktype;										// implementation only -1 (virtual), CLOCK_REALTIME
-};
-
-static inline {
-	void resetClock( Clock & clk ) with( clk ) {
-		clocktype = CLOCK_REALTIME_COARSE;
-	} // Clock::resetClock
-
-	void resetClock( Clock & clk, Duration adj ) with( clk ) {
-		clocktype = -1;
-		offset = adj + __timezone`s;					// timezone (global) is (UTC - local time) in seconds
-	} // resetClock
-
-	void ?{}( Clock & clk ) { resetClock( clk ); }
-	void ?{}( Clock & clk, Duration adj ) { resetClock( clk, adj ); }
-
-	Duration getResNsec() {
-		struct timespec res;
-		clock_getres( CLOCK_REALTIME, &res );
-		return ((int64_t)res.tv_sec * TIMEGRAN + res.tv_nsec)`ns;
-	} // getRes
-
-	Duration getRes() {
-		struct timespec res;
-		clock_getres( CLOCK_REALTIME_COARSE, &res );
-		return ((int64_t)res.tv_sec * TIMEGRAN + res.tv_nsec)`ns;
-	} // getRes
-
-	Time getTimeNsec() {								// with nanoseconds
-		timespec curr;
-		clock_gettime( CLOCK_REALTIME, &curr );
-		return (Time){ curr };
-	} // getTimeNsec
-
-	Time getTime() {									// without nanoseconds
-		timespec curr;
-		clock_gettime( CLOCK_REALTIME_COARSE, &curr );
-		curr.tv_nsec = 0;
-		return (Time){ curr };
-	} // getTime
-
-	Time getTime( Clock & clk ) with( clk ) {
-		return getTime() + offset;
-	} // getTime
-
-	Time ?()( Clock & clk ) with( clk ) {				// alternative syntax
-		return getTime() + offset;
-	} // getTime
-
-	timeval getTime( Clock & clk ) {
-		return (timeval){ clk() };
-	} // getTime
-
-	tm getTime( Clock & clk ) with( clk ) {
-		tm ret;
-		localtime_r( getTime( clk ).tv_sec, &ret );
-		return ret;
-	} // getTime
-} // distribution
-
-// Local Variables: //
-// mode: c //
-// tab-width: 4 //
-// End: //
Index: libcfa/src/concurrency/alarm.cfa
===================================================================
--- libcfa/src/concurrency/alarm.cfa	(revision 7006ba58edfad29340faefc4f3cd491ea4ff94d8)
+++ libcfa/src/concurrency/alarm.cfa	(revision e0c235ca8e62339b4cd07c92fdf5cb4522119b86)
@@ -10,6 +10,6 @@
 // Created On       : Fri Jun 2 11:31:25 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Dec  3 22:47:24 2019
-// Update Count     : 68
+// Last Modified On : Sun Jan  5 08:41:36 2020
+// Update Count     : 69
 //
 
@@ -39,5 +39,5 @@
 
 void __kernel_set_timer( Duration alarm ) {
-	verifyf(alarm >= 1`us || alarm == 0, "Setting timer to < 1us (%jins)", alarm.tv);
+	verifyf(alarm >= 1`us || alarm == 0, "Setting timer to < 1us (%jins)", alarm`ns);
 	setitimer( ITIMER_REAL, &(itimerval){ alarm }, 0p );
 }
Index: libcfa/src/time.cfa
===================================================================
--- libcfa/src/time.cfa	(revision 7006ba58edfad29340faefc4f3cd491ea4ff94d8)
+++ libcfa/src/time.cfa	(revision e0c235ca8e62339b4cd07c92fdf5cb4522119b86)
@@ -10,6 +10,6 @@
 // Created On       : Tue Mar 27 13:33:14 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 13 08:41:55 2019
-// Update Count     : 65
+// Last Modified On : Sun Jan  5 17:27:40 2020
+// Update Count     : 69
 //
 
@@ -33,6 +33,6 @@
 forall( dtype ostype | ostream( ostype ) ) {
 	ostype & ?|?( ostype & os, Duration dur ) with( dur ) {
-		(ostype &)(os | tv / TIMEGRAN);					// print seconds
-		long int ns = (tv < 0 ? -tv : tv) % TIMEGRAN;	// compute nanoseconds
+		(ostype &)(os | tn / TIMEGRAN);					// print seconds
+		long int ns = (tn < 0 ? -tn : tn) % TIMEGRAN;	// compute nanoseconds
 		if ( ns != 0 ) {								// some ?
 			char buf[16];
@@ -52,39 +52,31 @@
 
 #ifdef __CFA_DEBUG__
-static void tabort( int year, int month, int day, int hour, int min, int sec, int nsec ) {
+static void tabort( int year, int month, int day, int hour, int min, int sec, int64_t nsec ) {
 	abort | "Attempt to create Time( year=" | year | "(>=1970), month=" | month | "(1-12), day=" | day | "(1-31), hour=" | hour | "(0-23), min=" | min | "(0-59), sec=" | sec
-		  | "(0-60), nsec=" | nsec | "(0-999_999_999), which exceeds range 00:00:00 UTC, January 1, 1970 to 03:14:07 UTC, January 19, 2038.";
+		  | "(0-60), nsec=" | nsec | "(0-999_999_999), which is not in the range 00:00:00 UTC, January 1, 1970 to 03:14:07 UTC, January 19, 2038, where month and day have 1 origin.";
 } // tabort
 #endif // __CFA_DEBUG__
 
-void ?{}( 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, int64_t nsec ) with( time ) {
 	tm tm;
 
-	tm.tm_isdst = -1;									// let mktime determine if alternate timezone is in effect
+	// Values can be in any range (+/-) but result must be in the epoch.
 	tm.tm_year = year - 1900;							// mktime uses 1900 as its starting point
-#ifdef __CFA_DEBUG__
-	if ( month < 1 || 12 < month ) {
-		tabort( year, month, day, hour, min, sec, nsec );
-	} // if
-#endif // __CFA_DEBUG__
+	// Make month in range 1-12 to match with day.
 	tm.tm_mon = month - 1;								// mktime uses range 0-11
-#ifdef __CFA_DEBUG__
-	if ( day < 1 || 31 < day ) {
-		tabort( year, month, day, hour, min, sec, nsec );
-	} // if
-#endif // __CFA_DEBUG__
 	tm.tm_mday = day;									// mktime uses range 1-31
 	tm.tm_hour = hour;
 	tm.tm_min = min;
 	tm.tm_sec = sec;
+	tm.tm_isdst = -1;									// let mktime determine if alternate timezone is in effect
 	time_t epochsec = mktime( &tm );
 #ifdef __CFA_DEBUG__
-	if ( epochsec == (time_t)-1 ) {
+	if ( epochsec <= (time_t)-1 ) {						// MUST BE LESS THAN OR EQUAL!
 		tabort( year, month, day, hour, min, sec, nsec );
 	} // if
 #endif // __CFA_DEBUG__
-	tv = (int64_t)(epochsec) * TIMEGRAN + nsec;			// convert to nanoseconds
+	tn = (int64_t)(epochsec) * TIMEGRAN + nsec;			// convert to nanoseconds
 #ifdef __CFA_DEBUG__
-	if ( tv > 2147483647LL * TIMEGRAN ) {				// between 00:00:00 UTC, January 1, 1970 and 03:14:07 UTC, January 19, 2038.
+	if ( tn > 2147483647LL * TIMEGRAN ) {				// between 00:00:00 UTC, January 1, 1970 and 03:14:07 UTC, January 19, 2038.
 		tabort( year, month, day, hour, min, sec, nsec );
 	} // if
@@ -93,5 +85,5 @@
 
 char * yy_mm_dd( Time time, char * buf ) with( time ) {
-	time_t s = tv / TIMEGRAN;
+	time_t s = tn / TIMEGRAN;
 	tm tm;
 	gmtime_r( &s, &tm );								// tm_mon <= 11, tm_mday <= 31
@@ -108,5 +100,5 @@
 
 char * mm_dd_yy( Time time, char * buf ) with( time ) {
-	time_t s = tv / TIMEGRAN;
+	time_t s = tn / TIMEGRAN;
 	tm tm;
 	gmtime_r( &s, &tm );								// tm_mon <= 11, tm_mday <= 31
@@ -123,5 +115,5 @@
 
 char * dd_mm_yy( Time time, char * buf ) with( time ) {
-	time_t s = tv / TIMEGRAN;
+	time_t s = tn / TIMEGRAN;
 	tm tm;
 	gmtime_r( &s, &tm );								// tm_mon <= 11, tm_mday <= 31
@@ -138,5 +130,5 @@
 
 size_t strftime( char * buf, size_t size, const char * fmt, Time time ) with( time ) {
-	time_t s = tv / TIMEGRAN;
+	time_t s = tn / TIMEGRAN;
 	tm tm;
 	gmtime_r( &s, &tm );
@@ -147,8 +139,8 @@
 	ostype & ?|?( ostype & os, Time time ) with( time ) {
 		char buf[32];									// at least 26
-		time_t s = tv / TIMEGRAN;
+		time_t s = tn / TIMEGRAN;
 		ctime_r( &s, (char *)&buf );					// 26 characters: "Wed Jun 30 21:49:08 1993\n"
 		buf[24] = '\0';									// remove trailing '\n'
-		long int ns = (tv < 0 ? -tv : tv) % TIMEGRAN;	// compute nanoseconds
+		long int ns = (tn < 0 ? -tn : tn) % TIMEGRAN;	// compute nanoseconds
 		if ( ns == 0 ) {								// none ?
 			(ostype &)(os | buf);						// print date/time/year
Index: libcfa/src/time.hfa
===================================================================
--- libcfa/src/time.hfa	(revision 7006ba58edfad29340faefc4f3cd491ea4ff94d8)
+++ libcfa/src/time.hfa	(revision e0c235ca8e62339b4cd07c92fdf5cb4522119b86)
@@ -10,6 +10,6 @@
 // Created On       : Wed Mar 14 23:18:57 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Sep 22 12:25:34 2018
-// Update Count     : 643
+// Last Modified On : Sun Jan  5 19:01:07 2020
+// Update Count     : 652
 //
 
@@ -32,39 +32,39 @@
 	Duration ?=?( Duration & dur, __attribute__((unused)) zero_t ) { return dur{ 0 }; }
 
-	Duration +?( Duration rhs ) with( rhs ) {	return (Duration)@{ +tv }; }
-	Duration ?+?( Duration & lhs, Duration rhs ) { return (Duration)@{ lhs.tv + rhs.tv }; }
+	Duration +?( Duration rhs ) with( rhs ) { return (Duration)@{ +tn }; }
+	Duration ?+?( Duration & lhs, Duration rhs ) { return (Duration)@{ lhs.tn + rhs.tn }; }
 	Duration ?+=?( Duration & lhs, Duration rhs ) { lhs = lhs + rhs; return lhs; }
 
-	Duration -?( Duration rhs ) with( rhs ) { return (Duration)@{ -tv }; }
-	Duration ?-?( Duration & lhs, Duration rhs ) { return (Duration)@{ lhs.tv - rhs.tv }; }
+	Duration -?( Duration rhs ) with( rhs ) { return (Duration)@{ -tn }; }
+	Duration ?-?( Duration & lhs, Duration rhs ) { return (Duration)@{ lhs.tn - rhs.tn }; }
 	Duration ?-=?( Duration & lhs, Duration rhs ) { lhs = lhs - rhs; return lhs; }
 
-	Duration ?*?( Duration lhs, int64_t rhs ) { return (Duration)@{ lhs.tv * rhs }; }
-	Duration ?*?( int64_t lhs, Duration rhs ) { return (Duration)@{ lhs * rhs.tv }; }
+	Duration ?*?( Duration lhs, int64_t rhs ) { return (Duration)@{ lhs.tn * rhs }; }
+	Duration ?*?( int64_t lhs, Duration rhs ) { return (Duration)@{ lhs * rhs.tn }; }
 	Duration ?*=?( Duration & lhs, int64_t rhs ) { lhs = lhs * rhs; return lhs; }
 
-	int64_t ?/?( Duration lhs, Duration rhs ) { return lhs.tv / rhs.tv; }
-	Duration ?/?( Duration lhs, int64_t rhs ) { return (Duration)@{ lhs.tv / rhs }; }
+	int64_t ?/?( Duration lhs, Duration rhs ) { return lhs.tn / rhs.tn; }
+	Duration ?/?( Duration lhs, int64_t rhs ) { return (Duration)@{ lhs.tn / rhs }; }
 	Duration ?/=?( Duration & lhs, int64_t rhs ) { lhs = lhs / rhs; return lhs; }
-	double div( Duration lhs, Duration rhs ) { return (double)lhs.tv / (double)rhs.tv; }
-
-	Duration ?%?( Duration lhs, Duration rhs ) { return (Duration)@{ lhs.tv % rhs.tv }; }
+	double div( Duration lhs, Duration rhs ) { return (double)lhs.tn / (double)rhs.tn; }
+
+	Duration ?%?( Duration lhs, Duration rhs ) { return (Duration)@{ lhs.tn % rhs.tn }; }
 	Duration ?%=?( Duration & lhs, Duration rhs ) { lhs = lhs % rhs; return lhs; }
 
-	bool ?==?( Duration lhs, Duration rhs ) { return lhs.tv == rhs.tv; }
-	bool ?!=?( Duration lhs, Duration rhs ) { return lhs.tv != rhs.tv; }
-	bool ?<? ( Duration lhs, Duration rhs ) { return lhs.tv <  rhs.tv; }
-	bool ?<=?( Duration lhs, Duration rhs ) { return lhs.tv <= rhs.tv; }
-	bool ?>? ( Duration lhs, Duration rhs ) { return lhs.tv >  rhs.tv; }
-	bool ?>=?( Duration lhs, Duration rhs ) { return lhs.tv >= rhs.tv; }
-
-	bool ?==?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv == 0; }
-	bool ?!=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv != 0; }
-	bool ?<? ( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv <  0; }
-	bool ?<=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv <= 0; }
-	bool ?>? ( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv >  0; }
-	bool ?>=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv >= 0; }
-
-	Duration abs( Duration rhs ) { return rhs.tv >= 0 ? rhs : -rhs; }
+	bool ?==?( Duration lhs, Duration rhs ) { return lhs.tn == rhs.tn; }
+	bool ?!=?( Duration lhs, Duration rhs ) { return lhs.tn != rhs.tn; }
+	bool ?<? ( Duration lhs, Duration rhs ) { return lhs.tn <  rhs.tn; }
+	bool ?<=?( Duration lhs, Duration rhs ) { return lhs.tn <= rhs.tn; }
+	bool ?>? ( Duration lhs, Duration rhs ) { return lhs.tn >  rhs.tn; }
+	bool ?>=?( Duration lhs, Duration rhs ) { return lhs.tn >= rhs.tn; }
+
+	bool ?==?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tn == 0; }
+	bool ?!=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tn != 0; }
+	bool ?<? ( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tn <  0; }
+	bool ?<=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tn <= 0; }
+	bool ?>? ( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tn >  0; }
+	bool ?>=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tn >= 0; }
+
+	Duration abs( Duration rhs ) { return rhs.tn >= 0 ? rhs : -rhs; }
 
 	Duration ?`ns( int64_t nsec ) { return (Duration)@{ nsec }; }
@@ -82,15 +82,15 @@
 	Duration ?`w( double weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
 
-	int64_t ?`ns( Duration dur ) { return dur.tv; }
-	int64_t ?`us( Duration dur ) { return dur.tv / (TIMEGRAN / 1_000_000LL); }
-	int64_t ?`ms( Duration dur ) { return dur.tv / (TIMEGRAN / 1_000LL); }
-	int64_t ?`s( Duration dur ) { return dur.tv / TIMEGRAN; }
-	int64_t ?`m( Duration dur ) { return dur.tv / (60LL * TIMEGRAN); }
-	int64_t ?`h( Duration dur ) { return dur.tv / (60LL * 60LL * TIMEGRAN); }
-	int64_t ?`d( Duration dur ) { return dur.tv / (24LL * 60LL * 60LL * TIMEGRAN); }
-	int64_t ?`w( Duration dur ) { return dur.tv / (7LL * 24LL * 60LL * 60LL * TIMEGRAN); }
-
-	Duration max( Duration lhs, Duration rhs ) { return  (lhs.tv < rhs.tv) ? rhs : lhs;}
-	Duration min( Duration lhs, Duration rhs ) { return !(rhs.tv < lhs.tv) ? lhs : rhs;}
+	int64_t ?`ns( Duration dur ) { return dur.tn; }
+	int64_t ?`us( Duration dur ) { return dur.tn / (TIMEGRAN / 1_000_000LL); }
+	int64_t ?`ms( Duration dur ) { return dur.tn / (TIMEGRAN / 1_000LL); }
+	int64_t ?`s( Duration dur ) { return dur.tn / TIMEGRAN; }
+	int64_t ?`m( Duration dur ) { return dur.tn / (60LL * TIMEGRAN); }
+	int64_t ?`h( Duration dur ) { return dur.tn / (60LL * 60LL * TIMEGRAN); }
+	int64_t ?`d( Duration dur ) { return dur.tn / (24LL * 60LL * 60LL * TIMEGRAN); }
+	int64_t ?`w( Duration dur ) { return dur.tn / (7LL * 24LL * 60LL * 60LL * TIMEGRAN); }
+
+	Duration max( Duration lhs, Duration rhs ) { return  (lhs.tn < rhs.tn) ? rhs : lhs;}
+	Duration min( Duration lhs, Duration rhs ) { return !(rhs.tn < lhs.tn) ? lhs : rhs;}
 } // distribution
 
@@ -143,33 +143,35 @@
 //######################### Time #########################
 
-void ?{}( Time & time, int year, int month = 0, int day = 0, int hour = 0, int min = 0, int sec = 0, int nsec = 0 );
+void ?{}( Time & time, int year, int month = 1, int day = 1, int hour = 0, int min = 0, int sec = 0, int64_t nsec = 0 );
 static inline {
 	Time ?=?( Time & time, __attribute__((unused)) zero_t ) { return time{ 0 }; }
 
-	void ?{}( Time & time, timeval t ) with( time ) { tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * 1000; }
+	void ?{}( Time & time, timeval t ) with( time ) { tn = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * 1000; }
 	Time ?=?( Time & time, timeval t ) with( time ) {
-		tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * (TIMEGRAN / 1_000_000LL);
+		tn = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * (TIMEGRAN / 1_000_000LL);
 		return time;
 	} // ?=?
 
-	void ?{}( Time & time, timespec t ) with( time ) { tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec; }
+	void ?{}( Time & time, timespec t ) with( time ) { tn = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec; }
 	Time ?=?( Time & time, timespec t ) with( time ) {
-		tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec;
+		tn = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec;
 		return time;
 	} // ?=?
 
-	Time ?+?( Time & lhs, Duration rhs ) { return (Time)@{ lhs.tv + rhs.tv }; }
+	Time ?+?( Time & lhs, Duration rhs ) { return (Time)@{ lhs.tn + rhs.tn }; }
 	Time ?+?( Duration lhs, Time rhs ) { return rhs + lhs; }
 	Time ?+=?( Time & lhs, Duration rhs ) { lhs = lhs + rhs; return lhs; }
 
-	Duration ?-?( Time lhs, Time rhs ) { return (Duration)@{ lhs.tv - rhs.tv }; }
-	Time ?-?( Time lhs, Duration rhs ) { return (Time)@{ lhs.tv - rhs.tv }; }
+	Duration ?-?( Time lhs, Time rhs ) { return (Duration)@{ lhs.tn - rhs.tn }; }
+	Time ?-?( Time lhs, Duration rhs ) { return (Time)@{ lhs.tn - rhs.tn }; }
 	Time ?-=?( Time & lhs, Duration rhs ) { lhs = lhs - rhs; return lhs; }
-	bool ?==?( Time lhs, Time rhs ) { return lhs.tv == rhs.tv; }
-	bool ?!=?( Time lhs, Time rhs ) { return lhs.tv != rhs.tv; }
-	bool ?<?( Time lhs, Time rhs ) { return lhs.tv < rhs.tv; }
-	bool ?<=?( Time lhs, Time rhs ) { return lhs.tv <= rhs.tv; }
-	bool ?>?( Time lhs, Time rhs ) { return lhs.tv > rhs.tv; }
-	bool ?>=?( Time lhs, Time rhs ) { return lhs.tv >= rhs.tv; }
+	bool ?==?( Time lhs, Time rhs ) { return lhs.tn == rhs.tn; }
+	bool ?!=?( Time lhs, Time rhs ) { return lhs.tn != rhs.tn; }
+	bool ?<?( Time lhs, Time rhs ) { return lhs.tn < rhs.tn; }
+	bool ?<=?( Time lhs, Time rhs ) { return lhs.tn <= rhs.tn; }
+	bool ?>?( Time lhs, Time rhs ) { return lhs.tn > rhs.tn; }
+	bool ?>=?( Time lhs, Time rhs ) { return lhs.tn >= rhs.tn; }
+
+	int64_t ?`ns( Time t ) { return t.tn; }
 } // distribution
 
@@ -194,6 +196,6 @@
 
 static inline void ?{}( timeval & t, Time time ) with( t, time ) {
-	tv_sec = tv / TIMEGRAN;								// seconds
-	tv_usec = tv % TIMEGRAN / (TIMEGRAN / 1_000_000LL);	// microseconds
+	tv_sec = tn / TIMEGRAN;								// seconds
+	tv_usec = tn % TIMEGRAN / (TIMEGRAN / 1_000_000LL);	// microseconds
 } // ?{}
 
@@ -201,7 +203,79 @@
 
 static inline void ?{}( timespec & t, Time time ) with( t, time ) {
-	tv_sec = tv / TIMEGRAN;								// seconds
-	tv_nsec = tv % TIMEGRAN;							// nanoseconds
+	tv_sec = tn / TIMEGRAN;								// seconds
+	tv_nsec = tn % TIMEGRAN;							// nanoseconds
 } // ?{}
+
+//######################### C time #########################
+
+static inline char * ctime( time_t tp ) { char * buf = ctime( &tp ); buf[24] = '\0'; return buf; }
+static inline char * ctime_r( time_t tp, char * buf ) { ctime_r( &tp, buf ); buf[24] = '\0'; return buf; }
+static inline tm * gmtime( time_t tp ) { return gmtime( &tp ); }
+static inline tm * gmtime_r( time_t tp, tm * result ) { return gmtime_r( &tp, result ); }
+static inline tm * localtime( time_t tp ) { return localtime( &tp ); }
+static inline tm * localtime_r( time_t tp, tm * result ) { return localtime_r( &tp, result ); }
+
+//######################### Clock #########################
+
+struct Clock {											// private
+	Duration offset;									// for virtual clock: contains offset from real-time
+};
+
+static inline {
+	void resetClock( Clock & clk, Duration adj ) with( clk ) {
+		offset = adj + __timezone`s;					// timezone (global) is (UTC - local time) in seconds
+	} // resetClock
+
+	void ?{}( Clock & clk, Duration adj ) { resetClock( clk, adj ); }
+
+	Duration getResNsec() {
+		struct timespec res;
+		clock_getres( CLOCK_REALTIME, &res );
+		return ((int64_t)res.tv_sec * TIMEGRAN + res.tv_nsec)`ns;
+	} // getRes
+
+	Duration getRes() {
+		struct timespec res;
+		clock_getres( CLOCK_REALTIME_COARSE, &res );
+		return ((int64_t)res.tv_sec * TIMEGRAN + res.tv_nsec)`ns;
+	} // getRes
+
+	Time getTimeNsec() {								// with nanoseconds
+		timespec curr;
+		clock_gettime( CLOCK_REALTIME, &curr );
+		return (Time){ curr };
+	} // getTimeNsec
+
+	Time getTime() {									// without nanoseconds
+		timespec curr;
+		clock_gettime( CLOCK_REALTIME_COARSE, &curr );
+		curr.tv_nsec = 0;
+		return (Time){ curr };
+	} // getTime
+
+	Time getTime( Clock & clk ) with( clk ) {
+		return getTime() + offset;
+	} // getTime
+
+	Time ?()( Clock & clk ) with( clk ) {				// alternative syntax
+		return getTime() + offset;
+	} // getTime
+
+	timeval getTime( Clock & clk ) {
+		return (timeval){ clk() };
+	} // getTime
+
+	tm getTime( Clock & clk ) with( clk ) {
+		tm ret;
+		localtime_r( getTime( clk ).tv_sec, &ret );
+		return ret;
+	} // getTime
+
+	Time getCPUTime() {
+		timespec ts;
+		clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts );
+		return (Time){ ts };
+    } // getCPUTime
+} // distribution
 
 // Local Variables: //
Index: libcfa/src/time_t.hfa
===================================================================
--- libcfa/src/time_t.hfa	(revision 7006ba58edfad29340faefc4f3cd491ea4ff94d8)
+++ libcfa/src/time_t.hfa	(revision e0c235ca8e62339b4cd07c92fdf5cb4522119b86)
@@ -10,6 +10,6 @@
 // Created On       : Tue Apr 10 14:42:03 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Apr 13 07:51:47 2018
-// Update Count     : 6
+// Last Modified On : Sun Jan  5 08:22:46 2020
+// Update Count     : 7
 //
 
@@ -20,9 +20,9 @@
 
 struct Duration {										// private
-	int64_t tv;											// nanoseconds
+	int64_t tn;											// nanoseconds
 }; // Duration
 
-static inline void ?{}( Duration & dur ) with( dur ) { tv = 0; }
-static inline void ?{}( Duration & dur, __attribute__((unused)) zero_t ) with( dur ) { tv = 0; }
+static inline void ?{}( Duration & dur ) with( dur ) { tn = 0; }
+static inline void ?{}( Duration & dur, __attribute__((unused)) zero_t ) with( dur ) { tn = 0; }
 
 
@@ -30,9 +30,9 @@
 
 struct Time {											// private
-	uint64_t tv;										// nanoseconds since UNIX epoch
+	uint64_t tn;										// nanoseconds since UNIX epoch
 }; // Time
 
-static inline void ?{}( Time & time ) with( time ) { tv = 0; }
-static inline void ?{}( Time & time, __attribute__((unused)) zero_t ) with( time ) { tv = 0; }
+static inline void ?{}( Time & time ) with( time ) { tn = 0; }
+static inline void ?{}( Time & time, __attribute__((unused)) zero_t ) with( time ) { tn = 0; }
 
 // Local Variables: //
