Skip to content

Latest commit

 

History

History
50 lines (27 loc) · 1.17 KB

CppStdTime_t.md

File metadata and controls

50 lines (27 loc) · 1.17 KB

 

 

 

 

 

 

std::time_t is an STL data type for time.

 

 

 

 

 

Example

 


#include <cstdlib> #include <ctime> #include <iostream> int main() {   std::time_t my_time_before;   std::time( &my_time_before );   std::system("./Pause");   std::time_t my_time_after;   std::time( &my_time_after );   std::cout << std::difftime(my_time_after,my_time_before) << '\n'; }