There is no way to access a hero's revive time, but you could just calculate it yourself.
This is recent info I found in a reddit post:
The formula is revivetime = 55 seconds * level * 0.65
So it rounds up to 36 and 72 at levels 1 and 2 respectively, and rounds down to 107 at level 3.
It would continue to 143 seconds at level 4, all the way up to 356 seconds (almost 6 minutes) at level 10.
They capped it at 110 seconds because losing your hero at level 10 was so punishing. It took forever to get back, and that was back before taverns were around.
But in my tests I get 35/70/105 seconds using the default constants:
-
begin
-

Events
-


Unit - A unit Begins reviving
-

Conditions
-

Actions
-


Countdown Timer - Start Timer as a One-shot timer that will expire in 1000.00 seconds
-
finish
-

Events
-


Unit - A unit Finishes reviving
-

Conditions
-

Actions
-


Game - Display to (All players) for 30.00 seconds the text: (String((Elapsed time for Timer)))
I'm not sure why these values don't match the information above, but there could be several reasons (rounding down, misinformation, events/timer have a 1 second difference, etc).
Edit (again, again, again):
So your calculation could look like this:
-
Actions
-

-------- Edit these to match your constants / unit data: --------
-

Set Time_Base = 55.00
-

Set Time_Limit = 150.00
-

Set Time_Level_Factor = 0.65
-

Set Time_Max_Factor = 2.00
-

Set Time_Hero_Level = (Real(Hero level of your unit))
-

-------- Math time: --------
-

Set Time_Limit = (Min((Time_Base x Time_Max_Factor), Time_Limit))
-

Custom script: set udg_Time_Result = udg_Time_Base * udg_Time_Hero_Level * udg_Time_Level_Factor
-

Custom script: set udg_Time_Result = RMinBJ( (udg_Time_Result + 1.00) - udg_Time_Hero_Level, udg_Time_Limit )
-

-------- Final result: --------
-

Set Time_Result_Integer = (Integer(Time_Result))
-

Game - Display to (All players) for 30.00 seconds the text: (String(Time_Result_Integer))
Modify the variables to match your changes in the Gameplay Constants and take into consideration my results down below. Note that I may have made a mistake here, the added 1.00 second as well as subtracting the hero level at the end seem to work but I can't say for certain that it's 100% correct.
Time_Base is the
Stats - Build Time found in the Object Editor. (Thanks Chaosium)
Time_Limit is the
Hero Maximum Revive Cost - Time. (Gameplay Constant)
Time_Level_Factor is the
Hero Revive Cost - Time Level Factor. (Gameplay Constant)
HOWEVER, I'm still not 100% sure what
Hero Revive Cost - Maximum Time Factor does. In my tests I found these results:
Time Factor 1x, Lvl 1 Hero = 35 sec
Time Factor 1x, Lvl 2 Hero = 55 sec
Time Factor 1x, Lvl 3 Hero = 55 sec
Time Factor 1x, Lvl 5 Hero = 55 sec
Time Factor 1x, Lvl 10 Hero = 55 sec
Time Factor 2x, Lvl 1 Hero = 35 sec
Time Factor 2x, Lvl 2 Hero = 70 sec
Time Factor 2x, Lvl 3 Hero = 105 sec
Time Factor 2x, Lvl 4 Hero = 110 sec
Time Factor 2x, Lvl 5 Hero = 110 sec
Time Factor 2x, Lvl 10 Hero = 110 sec
Time Factor 3x, Lvl 1 Hero = 35 sec
Time Factor 3x, Lvl 3 Hero = 105 sec
Time Factor 3x, Lvl 5 hero = 150 sec (limit)
Time Factor 3x, Lvl 10 Hero = 150 sec (limit)
So a Time Factor of 1x seems to hit a limit at 55 seconds. Time Factor 2x hits a limit at 110 seconds. Time Factor 3x hits the expected Limit that we set of 150 seconds. I think this means that there's a hard cap equal to Build Time * Time Factor (55, 110, 165), however, if
Hero Maximum Revive Cost - Time is less than the hard cap it will be used instead.