SW006013 Microchip Technology, SW006013 Datasheet - Page 142

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
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 SW006013