On Tue, 30 Mar 2004, Phil wrote:
> I have a snapshot and am trying to read the values. Many of the variable
> types are probably stored as integers or longs, but I can only seem to
> get them as ints by doing this:
>
> atoi(web100_value_to_text(web100_get_var_type(var),buf)));
>
> This feels redundant. Is there a way to get the value as an int?
If you know that buf contains an int, you should be able to get the value
by dereferincing the pointer: *(int *)buf.
> I was also curious if there was a way to access a timestamp for the
> snapshot.
The Duration variable contains a timestamp of sorts. If you want this in
"real" time, you can use Duration as an offset from StartTime.
-John
_______________________________________________
Discussion mailing list
Discussion@xxxxxxxxxx
http://internal.web100.org/mailman/listinfo/discussion
|