SW006013 Microchip Technology, SW006013 Datasheet - Page 148

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 144
time
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Example:
Calculates the current calendar time.
<time.h>
time_t time(time_t *tod);
tod
Returns the calendar time encoded as a value of time_t.
If the target environment cannot determine the time, the function
returns -1, cast as a time_t. By default, the 16-bit compiler returns the
time as instruction cycles. This function is customizable. See
pic30-libs.
#include <time.h>
#include <stdio.h> /* for printf */
volatile int i;
int main(void)
{
}
Output:
Time = 256
time_t ticks;
time(0); /* start time */
for (i = 0; i < 10; i++) /* waste time */
time(&ticks); /* get time */
printf("Time = %ld\n", ticks);
pointer to storage location for time
/* for time
© 2008 Microchip Technology Inc.
*/

Related parts for SW006013