set the countdown

        :param str duration:
        :param str start_now:
180316
def countdown_set(self, duration, start_now):
        
        log.debug("countdown => set...")
        params = {'duration': duration, 'start_now': start_now}
        self._app_exec(
            "com.lametric.countdown", "countdown.configure", params
        )
110501
def _start(self):
        '''  '''
        self.start = time.time()
        self.result['start'] = str(datetime.datetime.now())
        if not self.pause_type == 'prompt':
            print "(^C-c = continue early, ^C-a = abort)"
842704
def countdown_timer(seconds=10):
    

    tick = 0.1  # seconds
    n_ticks = int(seconds / tick)

    widgets = ['Pause for panic: ', progressbar.ETA(), ' ', progressbar.Bar()]
    pbar = progressbar.ProgressBar(
        widgets=widgets, max_value=n_ticks
    ).start()

    for i in range(n_ticks):
        pbar.update(i)
        sleep(tick)

    pbar.finish()
273046
def set_interval(self, timer_id, interval):
        
        return lib.ztimerset_set_interval(self._as_parameter_, timer_id, interval)
92111
function(callback) {
			var t = this;

			if(!t.running && (!t.countdown || t.countdown && t.time.time > 0)) {
				t.face.start(t.time);
				t.timer.start(function() {
					t.flip();
					
					if(typeof callback === "function") {
						callback();
					}	
				});
			}
			else {
				t.log('Trying to start timer when countdown already at 0');
			}
		}
687297
def set_beginTimestamp(self,btimestamp=None):
        
        if btimestamp is None:
            import time
            btimestamp = time.strftime('%Y-%m-%dT%H:%M:%S%Z')
        self.node.set('beginTimestamp',btimestamp)
803435
def duration(self, value):
        

        if value is not None:
            assert type(value) is int, "'{0}' attribute: '{1}' type is not 'int'!".format("duration", value)
            assert value >= 0, "'{0}' attribute: '{1}' need to be exactly positive!".format("duration", value)
        self.__duration = value
899421
def settimeout(self, timeout):
        
        if timeout is not None:
            timeout = float(timeout)
        self._timeout = timeout
360947
function countdown(duration) {
		var endtime = Date.now()+duration;
		clearInterval(counter);
		var counter = window.setInterval(function(){
			remaining = endtime-Date.now();
			
			// Highlight remaining time when 20 seconds left, by flashing red text.
			if(remaining < 20*1000) $('.remaining-time').addClass('blink text-danger');
			
			// Stop the timer when count down finishes, otherwise change countdown text.
			if(remaining < 0) {
				clearInterval(counter);
				$('.remaining-time span').text(0);
				$('.remaining-time').removeClass('blink');
				//$('#input-form input, #input-form button').prop('disabled', true);
			} else {
				$('.remaining-time span').text(Math.round(remaining/1000));
			}
			
		}, 1000);
	}
191408
def countdown(self, interval: float = 0.5):
        
        for c in '54321':
            self.char_on(c)
            time.sleep(interval * 0.66667)
            self.all_off()
            time.sleep(interval * 0.33333)
1301368
def start(self):
        
        if not self._start:
            self._first_start = time.perf_counter()
            self._start = self._first_start
        else:
            self._start = time.perf_counter()
215395
def set_start_time(self, start_time):
        
        start_time = start_time or dt.time()
        if isinstance(start_time, dt.time): # ensure that we operate with time
            self.start_time = dt.time(start_time.hour, start_time.minute)
        else:
            self.start_time = dt.time(start_time.time().hour, start_time.time().minute)
383243
function(started_time) {

		var now = new Date().getTime();
		this._started_time = started_time || now;
		this._end_time = this._started_time + this._duration;

		if (now < this._end_time) {

			this._is_running = true;
			Lava.Cron.acceptTask(this);
			this.onTimer(now);

		} else {

			this.onTimer(this._end_time);

		}

	}
348865
def _delay_for_ratelimits(cls, start):
        """"""
        stop = datetime.now()
        duration_microseconds = (stop - start).microseconds
        if duration_microseconds < cls.REQUEST_TIME_MICROSECONDS:
            time.sleep((cls.REQUEST_TIME_MICROSECONDS - duration_microseconds)
                       / MICROSECONDS_PER_SECOND)
128485
def set_itunes_duration(self):
        """"""
        try:
            self.itunes_duration = self.soup.find('itunes:duration').string
        except AttributeError:
            self.itunes_duration = None
271671
def set_tempo(self, bpm):
        """"""
        self.bpm = bpm
        self.track_data += self.set_tempo_event(self.bpm)
683108
def run_timed(self, **kwargs):
        
        for key in kwargs:
            setattr(self, key, kwargs[key])
        self.command = self.COMMAND_RUN_TIMED