| // SPDX-License-Identifier: GPL-2.0+ |
| * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| static int do_sleep(struct cmd_tbl *cmdtp, int flag, int argc, |
| ulong start = get_timer(0); |
| delay = dectoul(argv[1], NULL) * CONFIG_SYS_HZ; |
| frpart = strchr(argv[1], '.'); |
| uint mult = CONFIG_SYS_HZ / 10; |
| for (frpart++; *frpart != '\0' && mult > 0; frpart++) { |
| if (*frpart < '0' || *frpart > '9') { |
| mdelay += (*frpart - '0') * mult; |
| while (get_timer(start) < delay) { |
| "delay execution for some time", |
| " - delay execution for N seconds (N is _decimal_ and can be\n" |