Redesigned and coded virtual timer macro