The realization of C-sharp countdown function.

Overview of requirements

perform the countdown task according to the remaining time obtained.

  1. there should be a label dynamic display of remaining time in the form
  2. perform operations when there are only 20 seconds left. All the time is over and proceed to operations 2

the remaining time is not fixed. The remaining time is obtained dynamically. The format is 08:12:30, hours: minutes: seconds. As above, the remaining time is 8 hours, 12 minutes: 30 seconds; no more than 12 hours.

I only consult the countdown part, dynamic acquisition of the remaining time has been completed.

since the software runs continuously according to the remaining time, it may be 10 hours or a few minutes, so you want the countdown to perform the task accurately as much as possible.

PS: I don"t understand C-sharp at all, PHP rookie, so please be as detailed as possible, thank you very much.

Apr.20,2022

simple can use Timer
complex can use third-party components: hangfire, Quartz.net

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38817-2b897.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38817-2b897.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?