2024-02-01 15:48:47 -05:00
|
|
|
import { Utils, Widget } from "../../import.js";
|
2024-01-01 21:29:18 -05:00
|
|
|
|
2024-02-01 15:48:47 -05:00
|
|
|
const Time = () =>
|
|
|
|
Widget.Box({
|
2024-01-01 21:29:18 -05:00
|
|
|
child: Widget.Label({
|
2024-02-01 15:48:47 -05:00
|
|
|
className: "date",
|
2024-01-01 21:29:18 -05:00
|
|
|
}).poll(
|
2024-02-01 15:48:47 -05:00
|
|
|
1000,
|
|
|
|
(self) =>
|
|
|
|
Utils.execAsync(["date", "+%a %b %d %H:%M"]).then((time) =>
|
|
|
|
self.label = time
|
|
|
|
),
|
2024-01-01 21:29:18 -05:00
|
|
|
),
|
2024-02-01 15:48:47 -05:00
|
|
|
});
|
2024-01-01 21:29:18 -05:00
|
|
|
|
2024-02-01 15:48:47 -05:00
|
|
|
export { Time };
|