I have a computation which is taking very long
AbsoluteTiming[sr = ShellRegion@region];
Instead of getting $Aborted, is there a system method to get a time estimate of how long it was running before being aborted?
Maybe the following construct suits your need, take for example
Module[{tic},
tic = SessionTime[];
CheckAbort[
Do[Print[n]; Pause[1], {n, 10}] (* here goes your expression *),
SessionTime[] - tic
]
or wrapped in a convenient function
SetAttributes[try, HoldFirst]
try[expr_] := Module[{tic},
tic = SessionTime[];
CheckAbort[expr, SessionTime[] - tic]
]
that can be called with some expression you wish to evaluate
try[Do[Pause[1]; Print[n], {n, 10}]]
Simply wrapping your computation in CheckAbort as suggested by @Sascha seems to be sufficient to achieve most of what you want. E.g.
AbsoluteTiming[CheckAbort[Pause[20], Null]]
Alt+., and then you want to see how long there in between the abort keystokes and when the evaluation queue is free again? – ktm Aug 21 '16 at 01:59region? – Greg Hurst Sep 12 '16 at 19:14