Example #1
0
        private void createNewTimedExecution(Type type, DateTimeOffset time, Action action)
        {
            var interval = time.Subtract(_systemTime.UtcNow()).TotalMilliseconds;

            if (interval < 0)
            {
                interval = 0;
            }


            _executions[type] = new TimedExecution(_logger, type, time, interval, action);
        }
        public void TimeExecution_actually_runs()
        {
            bool executed = false;

            var execution = new TimedExecution(new RecordingLogger(), GetType(), DateTime.Today, 15, () => {
                executed = true;

            });

            execution.WaitForCompletion(30.Seconds());

            executed.ShouldBeTrue();
        }
Example #3
0
        private void createNewTimedExecution(Type type, DateTimeOffset time, Action action)
        {
            var interval = time.Subtract(_systemTime.UtcNow()).TotalMilliseconds;
            if (interval < 0) interval = 0;

            _executions[type] = new TimedExecution(_logger, type, time, interval, action);
        }