diff --git a/src/Activity.cxx b/src/Activity.cxx
index f28478ae56caf87c36fed216695e16c3a8e10381..a963c5662bdc474bc8ab0dc99c54e8f631625eb6 100644
--- a/src/Activity.cxx
+++ b/src/Activity.cxx
@@ -51,7 +51,7 @@ namespace {
   {
     timespec ts;
     clock_gettime(CLOCK_MONOTONIC, &ts);
-    return std::uint64_t(ts.tv_sec) * 1000000000 + std::uint64_t(ts.tv_nsec);
+    return std::uint64_t(ts.tv_sec) * 1000ull * 1000ull * 1000ull + std::uint64_t(ts.tv_nsec);
   }
 }
 
@@ -362,9 +362,9 @@ namespace hltsv {
   {
     ERS_LOG("Starting l1 thread");
 
-    const std::uint64_t ms = 1000ull;
-    const std::uint64_t s = 1000ull * 1000ull;
-    std::uint64_t deadline = ns() + m_event_delay * ms;
+    const std::uint64_t us = 1000ull;
+    const std::uint64_t s = 1000ull * 1000ull * 1000ull;
+    std::uint64_t deadline = ns() + m_event_delay * us;
 
     uint64_t m_assigned = 0;   // counter of events from L1Source
 
@@ -390,7 +390,7 @@ namespace hltsv {
         }
         
         std::uint64_t now = ns();
-        std::uint64_t period = m_event_delay * ms;
+        std::uint64_t period = m_event_delay * us;
         if (period != 0) {
           if (now > deadline + 1 * s) {
             // We overshot the deadline by more than 1 s.