Skip to content

Date and time C pain

Tomas Mlcoch edited this page Jun 10, 2014 · 1 revision

Header files (APIs) for date and time manipulation

  • <time.h>
  • <sys/time.h>
  • <sys/timeb.h>

Useful function

  • ftime()
  • Returns the current time as seconds and milliseconds since the Epoch.
  • Use time() and gettimeofday() intead.
  • Deprecated
  • gettimeofday()
  • Gets the time as well as a timezone.
  • strftime()
  • Format date and time.