gfxinfo fixes

- Make sure timestamps are actually reported in microseconds.
- Eliminate duplicate entries from successive dumps
diff --git a/devlib/derived/fps.py b/devlib/derived/fps.py
index e595926..2695c4c 100644
--- a/devlib/derived/fps.py
+++ b/devlib/derived/fps.py
@@ -97,7 +97,7 @@
 
         if frame_count:
             duration = end_vsync - start_vsync
-            fps = (1e9 * frame_count) / float(duration)
+            fps = (1e6 * frame_count) / float(duration)
         else:
             duration = 0
             fps = 0
@@ -116,7 +116,7 @@
         data = pd.read_csv(measurements_csv.path)
         data = data[data.Flags_flags == 0]
         frame_time = data.FrameCompleted_time_us - data.IntendedVsync_time_us
-        per_frame_fps = (1e9 / frame_time)
+        per_frame_fps = (1e6 / frame_time)
         keep_filter = per_frame_fps > self.drop_threshold
         per_frame_fps = per_frame_fps[keep_filter]
         per_frame_fps.name = 'fps'
diff --git a/devlib/instrument/frames.py b/devlib/instrument/frames.py
index 54869c1..a2e06b3 100644
--- a/devlib/instrument/frames.py
+++ b/devlib/instrument/frames.py
@@ -1,3 +1,4 @@
+from __future__ import division
 from devlib.instrument import (Instrument, CONTINUOUS,
                                MeasurementsCsv, MeasurementType)
 from devlib.utils.rendering import (GfxinfoFrameCollector,
diff --git a/devlib/utils/rendering.py b/devlib/utils/rendering.py
index 7bb6f3a..6c3909d 100644
--- a/devlib/utils/rendering.py
+++ b/devlib/utils/rendering.py
@@ -195,6 +195,7 @@
     def _process_raw_file(self, fh):
         found = False
         try:
+            last_vsync = 0
             while True:
                 for line in fh:
                     if line.startswith('---PROFILEDATA---'):
@@ -205,7 +206,11 @@
                 for line in fh:
                     if line.startswith('---PROFILEDATA---'):
                         break
-                    self.frames.append(map(int, line.strip().split(',')[:-1]))  # has a trailing ','
+                    entries = map(int, line.strip().split(',')[:-1])  # has a trailing ','
+                    if entries[1] <= last_vsync:
+                        continue  # repeat frame
+                    last_vsync = entries[1]
+                    self.frames.append(entries)
         except StopIteration:
             pass
         if not found: