Is there a specific reason that you want to add the data to a hash table instead of a global variable? If you use a hash table, you have to /hsave it when you exit mIRC and /hload it right when mIRC opens, or else the hash won't exist (hashes are destroyed when mIRC closes). The simplest way is to use a global variable, or an ini file. Example:
on *:START:{
if (%stime) echo -a Last started mIRC $duration($calc($ctime - %stime)) ago.
else echo -a No record of you starting mIRC before.
set %stime $ctime
}
-genius_at_work