Questions tagged [system-clock]

130 questions
1
vote
3 answers

Changing the background of a button and sleep

I want to change the background of a button to red and then wait for one second before calling another activity. This is my code: btn1.setBackgroundColor(Color.RED); SystemClock.sleep(1000); startActivity(intent); The problem is that the…
1
vote
1 answer

How does CLOCK_MONOTONIC handle NTP changes to the system clock?

Savvy engineers use clock_gettime( CLOCK_MONOTONIC, &my_timspec_struct ) to get a continuously increasing epoch-style clock that is "unaffected" by changes to the system clock. (Where the epoch-start is not defined). However, CLOCK_MONOTONIC is…
Kingsley
  • 14,398
  • 5
  • 31
  • 53
1
vote
2 answers

How to sync Raspberry Pi system clock?

I have built a custom Linux OS for Raspberry Pi CM4 using Buildroot. I am able to boot it but my system clock is not synchronized. Its set to some static time and I want to show real time instead. I have selected BR2_PACKAGE_RTC_TOOLS=y,…
Preeti
  • 535
  • 1
  • 6
  • 30
1
vote
1 answer

Where can I find the GCC 9 implementation of std::chrono::system_clock::now()?

The chrono system header (/usr/include/c++/9/chrono) declares, but does not define, the static now() functions of its clocks. I also do not see an include that looks relevant. Where are these functions implemented?
Felix Dombek
  • 13,664
  • 17
  • 79
  • 131
1
vote
1 answer

Is querying time/cycles a serialized or a parallel request for all cores/threads?

Assuming there is a simple "which thread finishes loop first" benchmark, #include #include #include int main() { std::mutex m; std::thread t1([&](){ auto c1=clock(); for(int i=0;i<1000000;i++){ /*…
huseyin tugrul buyukisik
  • 11,469
  • 4
  • 45
  • 97
1
vote
2 answers

PIC32MX System clock half of expected Value/Harmony

I recently started in a fresh company where the programer that did the PIC32 programming is now gone and I do need to troubleshoot his uC-Code. He disliked the Microchip Harmony Configurator/Framework and thus he is only using the Peripheral Library…
Side2005
  • 53
  • 4
1
vote
2 answers

Realtime CPU clock vs High Frequency Software clock

I am curious to learn about the technology which is used in generating software clock in simulators. The frequency of my machine is only ~2.4GHz but I can generate up to 500THz clock using a simulator(Refer below system Verilog snippet ). `timescale…
1
vote
1 answer

system_clock returning negative time c++

I'm writing code to time a for loop, and I used code given to me by my professor, and it uses system_clock. My problem is that on one of my for loops that I am timing, it is returning a negative time. Sometimes it's different number, but always…
Cheyanne
  • 13
  • 4
1
vote
1 answer

Show Windows 10 native clock widget programmatically

So I use a clock replacement program. The problem is it also hijack clicks on the clock. So whenever I click on the clock in the notification area, program's popup menu launch rather than the default windows clock widget. I also tried AHK…
user2286243
1
vote
1 answer

External Crystal Connection

Hello I am developing a evaluation board for STM32F427. I am connecting an external RTC IC (DS3231). Do i need to connect an other external oscillator for processor? Because in STM32F407 discovery board they have connected an external 8MHz crystal…
1
vote
2 answers

How to manually change linux system time?

I have Mint Linux running in a VM. I tried through the GUI to set the date to an earlier date so I could try to mimic a database issue that occurred on production on that date. I tried to use the date command. Both times, within a few seconds the…
rmcsharry
  • 5,363
  • 6
  • 65
  • 108
1
vote
1 answer

Visual Clock: New to Processing

Back again with my visual clock. I need a bit of guidance. I am trying to make a "clock" graph that counts down the time (in hours) until event times that a user inputs, such as until they eat dinner, sleep etc. In my sketch, "now" is the dark grey…
1
vote
0 answers

Instanced Clocks in C++11

The new clocks in the std namespace all appear to be statically instantiated. high_resolution_clock is not a class of clocks with high resolution, but rather the system-wide high resolution clock, with static methods such as now. I understand why…
Cort Ammon
  • 10,221
  • 31
  • 45
1
vote
1 answer

reading the system clock value?

Is there a virtual/system clock running independently when a computer is booted? How can we read that value?
pvaju896
  • 1,397
  • 6
  • 25
  • 46
1
vote
1 answer

Is it possible to build a pure internal NTP system?

I have four machines running Ubuntu 14.04, one is a software router and the others connect to it. I installed NTP on each of them. What I want is to synchronize clocks among these four machines, with the router acting as the NTP server and the other…
hebothu
  • 269
  • 1
  • 9
1 2 3
8 9