This method will indeed add a timestamp, but it will be a timestamp of when the trial ended and not when the stimulus was displayed.
In some sense, what you want is already implemented in the library. The 'rt' data field is the difference between when the stimulus was presented (as estimated by JavaScript) and when the participant responded. So the close the RT values are to 0, the more synchronous the response is.
The problem with relying on RT is that it won't capture a response that is made before the stimulus is presented, which may very well happen if you are presenting stimuli rhythmically.
One solution might be to use the animation plugin. This could present stimuli at fixed intervals, and the plugin automatically records the presentation time and response time of all stimuli and any responses. (
http://docs.jspsych.org/plugins/jspsych-animation/). However it won't work if you need to present a rhythm that is not made up of a fixed interval. If that's the case I can chime in with some more thoughts on how to do it.