In the state machine, the duration timer event is represented by a relative time event.
![](/download/attachments/2287111/bpmn_duration_timer_event.png?version=1&modificationDate=1527162226000&api=v2)
Duration time should be set in the process instance at creation time in the corresponding generated attribute of the persistent state class.
![](/download/attachments/2287111/bpmn_timer_duration_attribute.png?version=1&modificationDate=1527163670000&api=v2)
Time is specified in seconds.
![](/download/attachments/2287111/bpmn_set_duration_timer.png?version=1&modificationDate=1527163671000&api=v2)