M
M
mrpinax2021-03-15 10:22:36
Programming
mrpinax, 2021-03-15 10:22:36

Is it possible to programmatically write a clock without using libraries?

There was an idea to write a clock in a programming language (no matter what) without using libraries.

Is such an implementation possible? What do you think about this question?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Vasily Bannikov, 2021-03-15
@vabka

Yes. You just have to implement the library functions yourself.

M
MihaTronik, 2021-03-20
@mixatronik

A library is a set of functions written in some programming language. If someone wrote them, then someone else can. Everything is possible, but the very formulation of the problem is not clear. What does "write a clock" mean? Display system time values? Or count seconds yourself, add them up to minutes, etc.? It still needs to be attached to something.

A
Armenian Radio, 2021-03-15
@gbg

It is possible if the standard library of your programming language has functions for obtaining a value from a real-time clock, or at least measuring real time that has elapsed since some point.

V
Vladimir Korotenko, 2021-03-15
@firedragon

Without what? libc ncurses qt Mesa? In addition, the clock has an interface, what will it be like for you? If not such strict requirements, then use setcursor position and time.h

F
Filipp42, 2021-03-15
@Filipp42

I suppose it is possible to do this in assembler, it gives maximum control over the system.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question