<div class="gmail_quote">On Thu, Nov 8, 2012 at 10:17 PM, Ryan Kubica <span dir="ltr"><<a href="mailto:kubicaryan@yahoo.com" target="_blank">kubicaryan@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br></div><div style="font-style:normal;font-size:13px;background-color:transparent;font-family:arial,helvetica,sans-serif">
RRD is interpolating the value since you aren't inserting on the step-second (<span style="font-family:'times new roman','new york',times,serif;font-size:16px">1352425140 </span><span style="font-family:'times new roman','new york',times,serif;font-size:16px">1352425200 etc...)</span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><div style="font-style:normal;font-size:13px;font-family:arial,helvetica,sans-serif">
<br></div><div style="font-style:normal;font-size:13px;font-family:arial,helvetica,sans-serif">Since your insert is part way into the step interval of <span style="background-color:transparent;font-family:'times new roman','new york',times,serif;font-size:16px">1352425140 </span><span style="background-color:transparent">rrd is splitting the value between the two step intervals.</span></div>
<div style="font-style:normal;font-size:13px;font-family:arial,helvetica,sans-serif"><br></div></div></div></div></blockquote><div><br>That's sort of what I thought might be happening.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif"><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><div style="font-style:normal;font-size:13px;font-family:arial,helvetica,sans-serif">
</div><div style="font-style:normal;font-size:13px;font-family:arial,helvetica,sans-serif">If you don't want interpolation the easiest way to avoid it is to subtract the modulus of time of 60 from time: time - (time % 60) ... gives you the step interval time to insert with.</div>
<div style="font-style:normal;font-size:13px;font-family:arial,helvetica,sans-serif"><br></div><div style="font-style:normal;font-size:13px;font-family:arial,helvetica,sans-serif">ps: you should also ensure that your loop code isn't doing a sleep 60, since you will drift in time with logic like that (that 3 seconds you gained between 121 and 184) ... use a wait counter that's based on: sync_time + 60 and wait until sync_time on each loop, etc. </div>
<br></div></div></div></blockquote></div><br>So now I'm doing such as this:<br><br>sync_time = time - (time % 60) ## set sync_time to zero secs<br><br>while (1) {<br> if (time == sync_time + 60) { ## has a minute elapsed<br>
sync_time = time - (time % 60) ## set current sync_time to zero secs; use this as the RRD insert time<br><br> #### grab data and record it ####<br><br> }<br>}<br><br>So far the calculated time field is dead on the RRD time field.<br>
<br>Thanks!<br><br>Kind Regards,<br>Chris<br>