11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Library FunctionsASCTIMESynopsis#include char * asctime (struct tm * t)DescriptionThe asctime() function takes the time broken down into the struct tm structure, pointed to by itsargument, and returns a 26 character string describing the current date and time in the format:Sun Sep 16 01:03:52 1973\n\0Note the newline at the end of the string. The width of each field in the string is fixed. Theexample gets the current time, converts it to a struct tm pointer with localtime(), it then convertsthis to ASCII and prints it. The time() function will need to be provided by the user (see time() fordetails).Example#include #include voidmain (void){time_t clock;struct tm * tp;}time(&clock);tp = localtime(&clock);printf("%s", asctime(tp));See Alsoctime(), gmtime(), localtime(), time()120

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!