* It allso applies those m-guessing euristics.
*/
static char *
-plus_minus(struct time_value *ptv, int doop)
+plus_minus(struct rrd_time_value *ptv, int doop)
{
static int op = PLUS;
static int prev_multiplier = -1;
* tod() computes the time of day (TIME-OF-DAY-SPEC)
*/
static char *
-tod(struct time_value *ptv)
+tod(struct rrd_time_value *ptv)
{
int hour, minute = 0;
int tlen;
* assign_date() assigns a date, adjusting year as appropriate
*/
static char *
-assign_date(struct time_value *ptv, long mday, long mon, long year)
+assign_date(struct rrd_time_value *ptv, long mday, long mon, long year)
{
if (year > 138) {
if (year > 1970)
* day() picks apart DAY-SPEC-[12]
*/
static char *
-day(struct time_value *ptv)
+day(struct rrd_time_value *ptv)
{
long mday=0, wday, mon, year = ptv->tm.tm_year;
int tlen;
/*
* parsetime() is the external interface that takes tspec, parses
- * it and puts the result in the time_value structure *ptv.
+ * it and puts the result in the rrd_time_value structure *ptv.
* It can return either absolute times (these are ensured to be
* correct) or relative time references that are expected to be
* added to some absolute time value and then normalized by
* the pointer to the error message in the case of problems
*/
char *
-parsetime(char *tspec, struct time_value *ptv)
+parsetime(char *tspec, struct rrd_time_value *ptv)
{
time_t now = time(NULL);
int hr = 0;
} /* parsetime */
-int proc_start_end (struct time_value *start_tv,
- struct time_value *end_tv,
+int proc_start_end (struct rrd_time_value *start_tv,
+ struct rrd_time_value *end_tv,
time_t *start,
time_t *end){
if (start_tv->type == RELATIVE_TO_END_TIME && /* same as the line above */
*****************************************************************************
* $Id$
* $Log$
+ * Revision 1.6 2003/11/11 19:46:21 oetiker
+ * replaced time_value with rrd_time_value as MacOS X introduced a struct of that name in their standard headers
+ *
* Revision 1.5 2003/04/25 18:35:08 jake
* Alternate update interface, updatev. Returns info about CDPs written to disk as result of update. Output format is similar to rrd_info, a hash of key-values.
*
#define TIME_OK NULL
-struct time_value {
+struct rrd_time_value {
timetype type;
long offset;
struct tm tm;
/* returns the current per-thread rrd_context */
struct rrd_context *rrd_get_context(void);
-char *parsetime(char *spec, struct time_value *ptv);
+char *parsetime(char *spec, struct rrd_time_value *ptv);
/* END parsetime.h */
-int proc_start_end (struct time_value *, struct time_value *, time_t *, time_t *);
+int proc_start_end (struct rrd_time_value *, struct rrd_time_value *, time_t *, time_t *);
/* HELPER FUNCTIONS */
void rrd_set_error(char *,...);
* */
#define MAX_STRFTIME_SIZE 256
char* printstrftime(long argc, char **args){
- struct time_value start_tv, end_tv;
+ struct rrd_time_value start_tv, end_tv;
char *parsetime_error = NULL;
char formatted[MAX_STRFTIME_SIZE];
struct tm *the_tm;
{
time_t last_up = time(NULL)-10;
unsigned long pdp_step = 300;
- struct time_value last_up_tv;
+ struct rrd_time_value last_up_tv;
char *parsetime_error = NULL;
long long_tmp;
int rc;
*****************************************************************************
* $Id$
* $Log$
+ * Revision 1.7 2003/11/11 19:46:21 oetiker
+ * replaced time_value with rrd_time_value as MacOS X introduced a struct of that name in their standard headers
+ *
* Revision 1.6 2003/01/16 23:27:54 oetiker
* fix border condition in rra selection of rrd_fetch
* -- Stanislav Sinyagin <ssinyagin@yahoo.com>
time_t start_tmp=0, end_tmp=0;
enum cf_en cf_idx;
- struct time_value start_tv, end_tv;
+ struct rrd_time_value start_tv, end_tv;
char *parsetime_error = NULL;
/* init start and end time */
char scan_gtm[12],scan_mtm[12],scan_ltm[12],col_nam[12];
time_t start_tmp=0,end_tmp=0;
long long_tmp;
- struct time_value start_tv, end_tv;
+ struct rrd_time_value start_tv, end_tv;
gfx_color_t color;
parsetime("end-24h", &start_tv);
int i=0;
char command[6]; /* step, start, end */
char tmpstr[256];
- struct time_value start_tv,end_tv;
+ struct rrd_time_value start_tv,end_tv;
time_t start_tmp=0,end_tmp=0;
char *parsetime_error=NULL;
*****************************************************************************
* $Id$
* $Log$
+ * Revision 1.14 2003/11/11 19:46:21 oetiker
+ * replaced time_value with rrd_time_value as MacOS X introduced a struct of that name in their standard headers
+ *
* Revision 1.13 2003/11/11 19:38:03 oetiker
* rrd files should NOT change size ever ... bulk update code wa buggy.
* -- David M. Grimes <dgrimes@navisite.com>
char *p;
char *parsetime_error = NULL;
enum {atstyle, normal} timesyntax;
- struct time_value ds_tv;
+ struct rrd_time_value ds_tv;
if (stepper == NULL){
rrd_set_error("failed duplication argv entry");
free(updvals);
time_t start_tmp=0,end_tmp=0;
char symname[100];
long scancount;
- struct time_value start_tv, end_tv;
+ struct rrd_time_value start_tv, end_tv;
char *parsetime_error = NULL;
rrd_graph_init(&im);