Dear all,
I am writing a stimulus program and need to obtain the start time of the stimulus so that I can align it with the system time later.
I tested the following code in matlab:
startTime = PsychPortAudio( 'Start’, pa, 1,0,1); % play audio and return the onset time
timeonset = posixtime(datetime( now))*1000; % system time
And I found that “startTime” and “timeonset” are not the same and their intervals are not fixed. “timeonset” is a POSIX time (number of seconds elapsed since 00:00:00 1-Jan-1970 UTC) while the specific encoding format of “startTime” is not clear.
I need “startTime” to ensure the stimulation precision in time. So, do I have any methods to get the POXIS format for “startTime”?
Thanks,
Ado