Uploaded image for project: 'DMC - Development'
  1. DMC - Development
  2. DMC-826

Fix the clock_gettime / -lrt mess

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Davix 0.6.4
    • Component/s: Davix
    • Security Level: Public Data (This ticket is visible to anyone on the internet and will be indexed by search engines)
    • Labels:
      None

      Description

      A monotonic clock is necessary to accurately calculate time passed. clock_gettime is one option, but only works for linux and BSD. (afaik)

      The system call was introduced in the 2.6 kernel, but the wrapper only in glibc 2.17. Which means we have to dynamically link against librt to get a wrapper, adding a runtime dependency on libdavix, and by extension on the ROOT plugin, and by extension on ROOT itself. Not good.

      Solutions:
      1. Live without a monotonic clock, relying on gettimeofday (current option)
      2. Try to use std::chrono::steady_clock if available, fallback on issuing the syscall directly without a wrapper, fallback on gettimeofday

        Attachments

          Activity

            People

            Assignee:
            gbitzes Georgios Bitzes
            Reporter:
            gbitzes Georgios Bitzes
            Component Watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: