I’m trying to write a simple profiler to measure how long operations take and the simplest way that I can see of doing this with Sugar is something like:
let startTicks = DateTime.Now.Ticks ...execute operation... let endTicks = DateTime.Now.Ticks let msTaken = endTime.Subtract(startTime).Milliseconds
However when I try to use DateTime.Now.Ticks I’m shown a compile time error that
Timespan doesn’t exist, unless I’m mistaken it should be
I’d make the change myself to test it but my Oxygene licence has expired, I do see a number of occurrences of
Timespan in the DateTime.pas file.