Can anyone explain if there is a difference between ftime() and time()?
Can anyone explain if there is a difference between ftime() and time() ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ftime()is a (deprecated) POSIX function to get both seconds and miliseconds since epoch,time()is ISO C (and, thanks to that, ISO C++ as well) function to get seconds since epoch.Quoting from
ftime(3)man page:Since you are writing C++, consider using
std::chronofrom C++11, which is native way to work with time intervals in C++.