rvagg/goingnative — pull request #44 by jkbits1 (2014-09-06 20:22:09+00:00)
Title: timing adjustments to checkExec

These changes enable my Linux set-up (details below) to pass the final offloading tutorial step. They are in this PR to create a discussion on whether they are necessary, or are due to other issues.

Without these changes, the actual sleep time exceeds the upper bound on both checks. For the first check, the sleep time is approx 370ms, and for the second, approx 1400ms. From memory and a quick google search, the time provided to Windows Sleep() is considered a guide only, and a wake time of 111ms is a bit on the low side. I have no personal coding experience of usleep() to comment on.

My set-up: Oracle VirtualBox VM running Ubuntu 12.04 LTS (32-bit) on a Windows host machine.

Testing: the changes have been tested as follows:

After creating a fork of goingnative, I copied my solution folder "myaddon" to the goingnative folder, and made the edits to the relevant exercise.js (in the "exercises\offloading*" folder). The code was tested several times in debug and normal mode.

The code was debugged with node-inspector:
`node-debug goingnative.js verify myaddon`

The code was also run with the same command line, but just with node.