Created
May 31, 2014 18:39
-
-
Save sealfin/6d35f3a3958bd6797a0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "printDateAndTime.h" | |
#include <time.h> | |
#include <stdio.h> | |
void p_PrintDateAndTime( void ) | |
{ | |
time_t t_0; | |
struct tm *t_1; | |
char s[ 26 ]; | |
time( &t_0 ); | |
t_1 = localtime( &t_0 ); | |
strftime( s, 26, "%a %b %d %H:%M:%S %Y\n", t_1 ); | |
printf( s ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef printDateAndTime_h | |
#define printDateAndTime_h | |
#ifdef __cplusplus | |
extern "C" | |
{ | |
#endif | |
void p_PrintDateAndTime( void ); | |
#ifdef __cplusplus | |
} | |
#endif | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment