Blockly use actual time

See the in process Blockly tutorial that covers, step-by-step something very similar to your scenario: