Using preferences to store timer duration