Microchip Technology SW006021-2 사용자 설명서
Library Functions
2012 Microchip Technology Inc.
DS52053B-page 337
Example
#include <xc.h>
void
main (void)
{
double x;
unsigned char y;
/* Get the slope reference ratio. */
x = get_cal_data(KREF);
/* Get the WDT time-out. */
y = TWDT;
}
Return Value
The value of the calibration parameter
Note
This function can only be used on the PIC14000.
GMTIME
Synopsis
#include <time.h>
struct tm * gmtime (time_t * t)
Description
This function converts the time pointed to by
t
which is in seconds since 00:00:00 on
Jan 1, 1970, into a broken down time stored in a structure as defined in
time.h
. The
structure is defined in the ‘Data Types’ section.
Example
#include <stdio.h>
#include <time.h>
void
main (void)
{
time_t clock;
struct tm * tp;
time(&clock);
tp = gmtime(&clock);
printf("It’s %d in London\n", tp->tm_year+1900);
}
See Also
ctime()
, asctime(), time(), localtime()
Return Value
Returns a structure of type
tm
.