Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
set a timer in the operant script
#3
Hello Samira,

Another way is:

Code:
timeSinceSessionStart = now*100000 - BpodSystem.ProtocolStartTime;

This will return the time in seconds since the protocol started. Note that this time is measured by MATLAB, not the state machine clock. The two clocks will drift slightly, but if the point is to automate session-end, it should work.

This way of doing it will allow you to use tic/toc inside your code for debugging if necessary.

-Josh
Reply


Messages In This Thread
set a timer in the operant script - by Samira - 08-31-2022, 06:47 AM
RE: set a timer in the operant script - by George - 09-01-2022, 05:32 AM
RE: set a timer in the operant script - by Josh - 09-01-2022, 04:24 PM

Forum Jump: