SW006014 Microchip Technology, SW006014 Datasheet - Page 142

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
DS51456E-page 138
NULL
Description:
Include:
asctime
Description:
Include:
Prototype:
Argument:
Return Value:
Example:
clock
Description:
Include:
Prototype:
Return Value:
Remarks:
The value of a null pointer constant.
<time.h>
Converts the time structure to a character string.
<time.h>
char *asctime(const struct tm *tptr);
tptr
Returns a pointer to a character string of the following format:
DDD is day of the week
MMM is month of the year
dd is day of the month
hh is hour
mm is minute
ss is second
YYYY is year
#include <time.h>
#include <stdio.h> /* for printf
volatile int i;
int main(void)
{
}
Output:
Day and time is Sat Feb
Calculates the processor time.
<time.h>
clock_t clock(void);
Returns the number of clock ticks of elapsed processor time.
If the target environment cannot measure elapsed processor time, the
function returns -1, cast as a clock_t. (i.e. (clock_t) -1) By default,
The 16-bit compiler returns the time as instruction cycles.
DDD MMM dd hh:mm:ss YYYY
struct tm when;
time_t whattime;
when.tm_sec = 30;
when.tm_min = 30;
when.tm_hour = 2;
when.tm_mday = 1;
when.tm_mon = 1;
when.tm_year = 103;
whattime = mktime(&when);
printf("Day and time is %s\n", asctime(&when));
time/date structure
/* for asctime, tm */
1 02:30:30 2003
© 2008 Microchip Technology Inc.
*/

Related parts for SW006014