#!/usr/bin/env bash

# Increase the system clock by the specified interval every 3 seconds
#
# Note, I was able to re-sync the local clock by restarting ntp
# using timedatectl:
#
# sudo timedatectl set-ntp off
# sudo timedatectl set-ntp on

format='+%m%d%H%M%Y.%S'
sudo echo $(date $format)

for i in {0..10}; do
	# add a second
	dt=$(date $format -d "$(date) + 1 sec")
	sudo date $dt
	echo $(date $format)
	# wait 3 seconds
	sleep 3
done

