function time = time_of_usage(dist)

time_index = find(dist.prob_table.p > rand, 1);
time = dist.prob_table.t(time_index);

end