Protable Approach To get System Time

This is a discussion on Protable Approach To get System Time within the C++ Programming forums, part of the General Programming Boards category; Hello to all, does anyone know any approaches that get system time that works on platform independent ? Thanks....

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    10

    Protable Approach To get System Time

    Hello to all, does anyone know any approaches that get system time that works on platform independent ?

    Thanks.

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,700
    >> Hello to all, does anyone know any approaches that get system time that works on platform independent ?

    Sure, any of the standard C library functions.
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    10
    You mean time(0);

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,700
    >> You mean time(0);

    I mean any of the function related to the ctime header. And just being pedantic here but time(0) is not a function but it's *invocation*.
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Read and set\change system time
    By Hexxx in forum C++ Programming
    Replies: 9
    Last Post: 01-02-2006, 06:11 AM
  2. Replies: 4
    Last Post: 06-13-2005, 09:03 AM
  3. time of system
    By arian in forum C++ Programming
    Replies: 3
    Last Post: 12-10-2003, 11:51 AM
  4. how to ouput system date and time?
    By toaster in forum C++ Programming
    Replies: 1
    Last Post: 04-21-2002, 10:58 PM
  5. Passing system time to a function
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 02-14-2002, 12:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21