Commits

Bryan O'Sullivan committed 4f5eb94

Filter out zero-valued clock differences

Comments (0)

Files changed (1)

Criterion/Environment.hs

   where
     resolution k = do
       times <- U.replicateM (k+1) getTime
-      return (U.tail . U.filter (>=0) . U.zipWith (-) (U.tail times) $ times,
+      return (U.tail . U.filter (>0) . U.zipWith (-) (U.tail times) $ times,
               U.length times)
     cost timeLimit = liftIO $ do
       let timeClock k = time_ (replicateM_ k getTime)