aboutsummaryrefslogtreecommitdiffstats
path: root/src/u_prints.go
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2022-03-29 22:18:15 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2022-03-29 22:18:15 +0200
commit4be5f62f0adc412c7eccccee59d03c00e5c4b5cf (patch)
treed3118e6fc8c60500b328e115ed5427900c21c2db /src/u_prints.go
parentNew file (diff)
downloadgo2work-4be5f62f0adc412c7eccccee59d03c00e5c4b5cf.tar.gz
go2work-4be5f62f0adc412c7eccccee59d03c00e5c4b5cf.tar.bz2
go2work-4be5f62f0adc412c7eccccee59d03c00e5c4b5cf.tar.xz
go2work-4be5f62f0adc412c7eccccee59d03c00e5c4b5cf.tar.zst
go2work-4be5f62f0adc412c7eccccee59d03c00e5c4b5cf.zip
Update
Diffstat (limited to '')
-rw-r--r--src/u_prints.go (renamed from src/c_prints.go)31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/c_prints.go b/src/u_prints.go
index 283fae4..45c48eb 100644
--- a/src/c_prints.go
+++ b/src/u_prints.go
@@ -38,8 +38,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * go2work: src/c_prints.go
- * Tue Mar 29 21:03:26 CEST 2022
+ * go2work: src/u_prints.go
+ * Tue Mar 29 22:15:02 CEST 2022
* Joe
*
* Stuff to print
@@ -49,8 +49,28 @@ package main
import (
"fmt"
+ "strconv"
)
+func print_time(t []string) {
+ fmt.Print("\rTime is: ", t[HOURS], ":", t[MINS], ":", t[SECS])
+}
+
+func print_time_left(curr_t []int, dest_t []int) {
+ var left_t [2]int
+ left_t = int{0, 0}
+ h, _ := strconv.Atoi(curr)
+ m
+ s, _ := strconv.Atoi(curr_t[SECS])
+ s = 60 - s
+ fmt.Print(
+ "\rTime left to sleep: ",
+ left_t[HOURS], "h ",
+ left_t[MINS], "m ",
+ s, "s",
+ )
+}
+
func print_help() {
fmt.Println("help")
}
@@ -62,10 +82,3 @@ func print_real_help() {
func print_version() {
fmt.Println(PROGNAME, VERSION)
}
-
-func print_time(t []string) {
- fmt.Print("\rTime is: ", t[HOURS], ":", t[MINS], ":", t[SECS])
-}
-
-func print_left_to_sleep(curr_t []string, dest_t []string) {
-}