2 docCopyright("Steve Dekorte", 2002)
3 docLicense("BSD revised")
6 #ifndef DURATION_DEFINED
7 #define DURATION_DEFINED 1
11 #include "PortableGettimeofday.h"
22 BASEKIT_API Duration
*Duration_new(void);
23 BASEKIT_API Duration
*Duration_newWithSeconds_(double s
);
24 BASEKIT_API Duration
*Duration_clone(const Duration
*self
);
25 BASEKIT_API
void Duration_copy_(Duration
*self
, const Duration
*other
);
27 BASEKIT_API
void Duration_free(Duration
*self
);
28 BASEKIT_API
int Duration_compare(const Duration
*self
, const Duration
*other
);
32 BASEKIT_API
int Duration_years(const Duration
*self
);
33 BASEKIT_API
void Duration_setYears_(Duration
*self
, double y
);
35 BASEKIT_API
int Duration_days(const Duration
*self
);
36 BASEKIT_API
void Duration_setDays_(Duration
*self
, double d
);
38 BASEKIT_API
int Duration_hours(const Duration
*self
);
39 BASEKIT_API
void Duration_setHours_(Duration
*self
, double m
);
41 BASEKIT_API
int Duration_minutes(const Duration
*self
);
42 BASEKIT_API
void Duration_setMinutes_(Duration
*self
, double m
);
44 BASEKIT_API
double Duration_seconds(const Duration
*self
);
45 BASEKIT_API
void Duration_setSeconds_(Duration
*self
, double s
);
49 BASEKIT_API
double Duration_asSeconds(const Duration
*self
);
50 BASEKIT_API
void Duration_fromSeconds_(Duration
*self
, double s
);
54 BASEKIT_API UArray
*Duration_asUArrayWithFormat_(const Duration
*self
, const char *format
);
55 BASEKIT_API
void Duration_print(const Duration
*self
);
59 BASEKIT_API
void Duration_add_(Duration
*self
, const Duration
*other
);
60 BASEKIT_API
void Duration_subtract_(Duration
*self
, const Duration
*other
);