I want to achieve the follwing functionality
while (getdate() < @StartTime + @GiveupTimeout)
call check proc
check results of proc
if success, do something
if failure, sleep for a second
@StartTime is a datetime field, @@GiveupTimeout is some number that I want to add in secs
say I want to add three mins, call check_proc returns a scalar value @Result of type int
How do I specify a time interval to add to the datetime field (in this case 3 mins)
Start Free Trial