CHDK_DE Vorschauversion  Trunk Rev. 6014
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
time.h-Dateireferenz
+ Dieser Graph zeigt, welche Datei direkt oder indirekt diese Datei enthält:

gehe zum Quellcode dieser Datei

Datenstrukturen

struct  tm
 
struct  utimbuf
 

Typdefinitionen

typedef unsigned long time_t
 

Funktionen

struct tmlocaltime (const time_t *_tod)
 
struct tmget_localtime ()
 
int utime (const char *file, struct utimbuf *newTimes)
 
unsigned long time (unsigned long *timer)
 
long strftime (char *s, unsigned long maxsize, const char *format, const struct tm *timp)
 
time_t mktime (struct tm *timp)
 

Dokumentation der benutzerdefinierten Typen

typedef unsigned long time_t

Definiert in Zeile 23 der Datei time.h.

Dokumentation der Funktionen

struct tm* get_localtime ( )

Definiert in Zeile 227 der Datei lib_thumb.c.

228 {
229  time_t t = time(NULL);
230  return localtime(&t);
231 }
struct tm* localtime ( const time_t _tod)

Definiert in Zeile 958 der Datei wrappers.c.

958  {
959 #if !CAM_DRYOS
960  return _localtime(_tod);
961 #else
962  // for DRYOS cameras do something with this! - sizeof(x[]) must be >= sizeof(struct tm) : 'static int x[9];'
963  static int x[10];
964  return _LocalTime(_tod, &x);
965 #endif
966 }
time_t mktime ( struct tm timp)

Definiert in Zeile 972 der Datei wrappers.c.

972  {
973 #if !CAM_DRYOS
974  return _mktime(timp);
975 #else
976  int timp_ext[10]; // struct tm + a ptr
977  _memcpy(timp_ext,timp,9*sizeof(int));
978  timp_ext[9]=0;
979  long retval = _mktime_ext(&timp_ext);
980  _memcpy(timp,timp_ext,9*sizeof(int));
981  return retval;
982 #endif
983 }
long strftime ( char *  s,
unsigned long  maxsize,
const char *  format,
const struct tm timp 
)

Definiert in Zeile 968 der Datei wrappers.c.

968  {
969  return _strftime(s,maxsize,format,timp);
970 }
unsigned long time ( unsigned long *  timer)

Definiert in Zeile 930 der Datei wrappers.c.

930  {
931  return _time(timer);
932 }
int utime ( const char *  file,
struct utimbuf newTimes 
)

Definiert in Zeile 934 der Datei wrappers.c.

934  {
935 #if !CAM_DRYOS
936  return _utime(file, newTimes);
937 #else
938  int res=0;
939  int fd;
940  fd = _open(file, 0, 0);
941 
942 #ifdef CAM_DRYOS_2_3_R39
943  if (fd>=0) {
944  _close(fd);
945  res=_SetFileTimeStamp(file, newTimes->modtime, newTimes->actime);
946  }
947 #else
948  if (fd>=0) {
949  res=_SetFileTimeStamp(fd, newTimes->modtime, newTimes->actime);
950  _close(fd);
951  }
952  // return value compatibe with utime: ok=0 fail=-1
953 #endif
954  return (res)?0:-1;
955 #endif
956 }