Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT Equiv to VS2010 time(_time_64)
Forum Updated to NodeBB v4.3 + New Features

QT Equiv to VS2010 time(_time_64)

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.6k 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.
  • A Offline
    A Offline
    awood969
    wrote on last edited by
    #1

    Hi all,

    The title pretty much says it all but I am looking for QT's version of Microsoft's time(_time_64) function, I need a function that will return the number of seconds since 01/01/1970. I don't need to manipulate this data in any way just need that number.

    Thanks
    Andrew

    I'm only asking as I'm stupid :-)

    1 Reply Last reply
    0
    • ZlatomirZ Offline
      ZlatomirZ Offline
      Zlatomir
      wrote on last edited by
      #2

      That function has nothing to do with Microsoft, it is a function from C library.
      So you can call that function with MingW compiler too.

      https://forum.qt.io/category/41/romanian

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        Static "QDateTime::currentMSecsSinceEpoch() ":http://doc.qt.nokia.com/latest/qdatetime.html#currentMSecsSinceEpoch is the Qt equivalent. It returns milliseconds, not seconds, so you might need to divide them by 1000 to get seconds.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved