```

import msvcrt

import time

from datetime import datetime


def unix_timestamp():

    return int(time.time())


def main():

    print("Press 'q' to quit")

    while True:

        if msvcrt.kbhit():  # 키 입력이 있으면

            ch = msvcrt.getch().decode('utf-8').lower()

            if ch == 'q':

                print("Quit")

                break

        now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")

        print(now, unix_timestamp())

        time.sleep(1)


if __name__ == "__main__":

    main()


```