Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. _ftime() and leap seconds

_ftime() and leap seconds

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vikramlinux
    wrote on last edited by
    #1

    Hi Friends, My program has a code which calculates time passed for a perticular opertion like

    Total time = End time - Start time

    Here I am using _ftime() function which says that it will provide me time since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). Now my programs keeps running on a machine which uses Network Time Protocol. Here NTP is compatible of leap seconds adjustment. I heard that leap second will be inserted on Dec 31 23:59:60(GMT). Now will this break my above expression?

    D 1 Reply Last reply
    0
    • V vikramlinux

      Hi Friends, My program has a code which calculates time passed for a perticular opertion like

      Total time = End time - Start time

      Here I am using _ftime() function which says that it will provide me time since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). Now my programs keeps running on a machine which uses Network Time Protocol. Here NTP is compatible of leap seconds adjustment. I heard that leap second will be inserted on Dec 31 23:59:60(GMT). Now will this break my above expression?

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      If extra time is added in between start and end, then the total time may be skewed.

      "Love people and use things, not love things and use people." - Unknown

      "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups