===== Time ===== ==== Blocks ==== === Wait a given number of seconds === {{:en:programmingblocks:time_1.png|}} With this block, you can force Kniwwelino to wait the specified number of seconds before executing the next block(s). \\ === Wait a given number of milliseconds === {{:en:programmingblocks:time_2.png|}} With this block, you can force Kniwwelino to wait the specified number of milliseconds before executing the next block(s). \\ === Wait a given number of microseconds === {{:en:programmingblocks:time_3.png|}} With this block, you can force Kniwwelino to wait the specified number of microseconds before executing the next block(s). \\ === Get the current date/time in a given format === {{:en:programmingblocks:time_4.png|}} This block returns the current date and/or time as a text in various formats. Options: * ''HH:mm:ss dd.MM.YYYY'' returns both time and date, such as 14:25:30 25.05.2018 * ''dd.MM.YYYY'' returns only the current date, such as, 25.05.2018 * ''HH:mm:ss'' returns only the current time, such as, 14:25:30 * ''HOUR'' returns only the current hour, such as 14 * ''MINUTE'' returns only the current minute, such as 25 * ''SECOND'' returns only the current second, such as 30 === Get the current date/time field as number === {{:en:programmingblocks:timeint.png|}} This block returns the current date and/or time as a integer number. Options: * ''YEAR'' returns the full year as four digits, such as 2018 * ''MONTH'' returns the month starting with January as 1, such as, 5 * ''DAY'' returns only the current day, such as, 13 * ''HOUR'' returns only the current hour, such as 14 * ''MINUTE'' returns only the current minute, such as 25 * ''SECOND'' returns only the current second, such as 30 \\ === Get the current elapsed time in seconds === {{:en:programmingblocks:time_5.png|}} This block returns in seconds the time which is currently elapsed since the start of the Kniwwelino. \\ === Get the current elapsed time in milliseconds === {{:en:programmingblocks:time_6.png|}} This block returns in milliseconds the time which is currently elapsed since the start of the Kniwwelino. ==== Example ==== The following example shows how you can use the ''wait'' blocks in order to show different icons on the matrix in a row. After each icon, Kniwwelino will wait 1 second before showing the next one. This approach allows you to create animations. {{:en:programmingblocks:time_example_1.png|}}