SW006014 Microchip Technology, SW006014 Datasheet - Page 143

C COMPILER MPLAB FOR PIC24 MCU

SW006014

Manufacturer Part Number
SW006014
Description
C COMPILER MPLAB FOR PIC24 MCU
Manufacturer
Microchip Technology
Type
MPLAB® C Compilerr
Series
PIC24r
Datasheet

Specifications of SW006014

Supported Families
PIC24
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24
Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC24
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2008 Microchip Technology Inc.
clock (Continued)
Example:
ctime
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Example:
#include <time.h>
#include <stdio.h> /* for printf */
volatile int i;
int main(void)
{
}
Output:
start = 0
stop = 317
Converts calendar time to a string representation of local time.
<time.h>
char *ctime(const time_t *tod);
tod
Returns the address of a string that represents the local time of the
parameter passed.
This function is equivalent to asctime(localtime(tod)).
#include <time.h>
#include <stdio.h> /* for printf
int main(void)
{
}
Output:
Day and time Sat Feb
clock_t start, stop;
int ct;
start = clock();
for (i = 0; i < 10; i++)
stop = clock();
printf("start = %ld\n", start);
printf("stop = %ld\n", stop);
time_t whattime;
struct tm nowtime;
nowtime.tm_sec = 30;
nowtime.tm_min = 30;
nowtime.tm_hour = 2;
nowtime.tm_mday = 1;
nowtime.tm_mon = 1;
nowtime.tm_year = 103;
whattime = mktime(&nowtime);
printf("Day and time %s\n", ctime(&whattime));
pointer to stored time
/* for clock
/* for mktime, tm, ctime */
1 02:30:30 2003
*/
DS51456E-page 139
*/

Related parts for SW006014