Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) std::time_t

 

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';
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict