Time Entry : Auto fill fields Hours minutes seconds

Time Entry : Auto fill fields Hours minutes seconds

Hello world,
Do someone know a script (for workflow rules) which fill automatically fields hours spent, minutes spent, seconds spent when we fill Executed time and End time

Formula should start from (End time - Executed time)
Thx in advance