keil中的<time.h>有没有对应的库函数
[复制链接]
我在项目中引用了<time.h>声明,似乎keil并没有实现相应的功能,只是给出了一个空声明。对应的函数好象需要自己实现,就如同pritf函数一样。
求各位高手指点!谢谢。
#pragma pop
/* struct tm holds the components of a calendar time, called the broken-down
* time. The value of tm_isdst is positive if Daylight Savings Time is in
* effect, zero if Daylight Savings Time is not in effect, and negative if
* the information is not available.
*/
extern _ARMABI clock_t clock(void);
/* determines the processor time used.
* Returns: the implementation's best approximation to the processor time
* used by the program since program invocation. The time in
* seconds is the value returned divided by the value of the macro
* CLK_TCK. The value (clock_t)-1 is returned if the processor time
* used is not available.
*/
extern _ARMABI double difftime(time_t /*time1*/, time_t /*time0*/);
/*
* computes the difference between two calendar times: time1 - time0.
* Returns: the difference expressed in seconds as a double.
*/
extern _ARMABI time_t mktime(struct tm * /*timeptr*/) __attribute__((__nonnull__(1)));
/*
* converts the broken-down time, expressed as local time, in the structure
* pointed to by timeptr into a calendar time value with the same encoding
* as that of the values returned by the time function. The original values
* of the tm_wday and tm_yday components of the structure are ignored, and
* the original values of the other components are not restricted to the
* ranges indicated above. On successful completion, the values of the
* tm_wday and tm_yday structure components are set appropriately, and the
* other components are set to represent the specified calendar time, but
* with their values forced to the ranges indicated above; the final value
* of tm_mday is not set until tm_mon and tm_year are determined.
* Returns: the specified calendar time encoded as a value of type time_t.
* If the calendar time cannot be represented, the function returns
* the value (time_t)-1.
*/
extern _ARMABI time_t time(time_t * /*timer*/);
/*
* determines the current calendar time. The encoding of the value is
* unspecified.
* Returns: the implementations best approximation to the current calendar
* time. The value (time_t)-1 is returned if the calendar time is
* not available. If timer is not a null pointer, the return value
* is also assigned to the object it points to.
*/
extern _ARMABI char *asctime(const struct tm * /*timeptr*/) __attribute__((__nonnull__(1)));
extern _ARMABI char *_asctime_r(const struct tm * /*timeptr*/,
char * __restrict /*buf*/) __attribute__((__nonnull__(1,2)));
#ifndef __STRICT_ANSI__
extern _ARMABI char *asctime_r(const struct tm * /*timeptr*/,
char * __restrict /*buf*/) __attribute__((__nonnull__(1,2)));
#endif
|