diff options
Diffstat (limited to 'src/clock.cpp')
-rw-r--r-- | src/clock.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/clock.cpp b/src/clock.cpp index e18a715..e95b5f6 100644 --- a/src/clock.cpp +++ b/src/clock.cpp @@ -106,6 +106,11 @@ uint64_t zmq::clock_t::rdtsc () } tsc; asm("rdtsc" : "=a" (tsc.u32val [0]), "=d" (tsc.u32val [1])); return tsc.u64val; +#elif defined(__s390__) + uint64_t tsc; + asm("\tstck\t%0\n" : "=Q" (tsc) : : "cc"); + tsc >>= 12; /* convert to microseconds just to be consistent */ + return(tsc); #else return 0; #endif |