131 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
3
votes
1
answer
296
views
Why does Instant.now() have a much higher precision on my Unix machine vs Windows?
To get a sense of how accurate Instant.now() is on various machines, I ran a very simple test to see how often the clock updated:
public class Test {
private static final Logger logger = ...
1
vote
1
answer
103
views
My code gets stuck in while loop at comment number 7 when waiting for status to to select the system clock as PLL clock?
#define TIMEOUT 1000000 // Timeout value to avoid infinite loops
/* System Clock Configuration */
void cfg_sys_clock()
{
uint32_t timeout;
//select 8khz as MSI
MODIFY_REG(RCC-...
0
votes
1
answer
44
views
How do I get a large integer value from the REALTIME operator in postscript? miliseconds?
The REALTIME operator is supposed to output the time in miliseconds.
I want to use that as a seed for RAND, but the output is always a two digit number between 24 and 31. How am I misunderstanding the ...
1
vote
0
answers
119
views
Why unable to flash the code when MCU(stm32u575) is in Stop2 Low power mode?
This is the method I am using below method to put on sleep mode which is working and wakeup also working based on configuration, but when I try to flash using jlink in when MCU is in sleep mode it is ...
0
votes
1
answer
215
views
Why Ac_cdc01d rule in synopsis spyglass CDC is disabled by default?
I tried enabling this rule and ran spyglass, (I have 2 clocks of same frequency and phase).
Still I'm getting a errors in cdc_verify saying data hold check failed in fast to slow clock transfer even ...
0
votes
0
answers
401
views
Any way to make linux system time go faster?
I'm working on an application related to time. In order to simulate a real environment, I needed to adjust the system clock of a virtual machine 1440 times faster (one day became one minute) during ...
0
votes
3
answers
870
views
Instant.now(new NanoClock()) returns incorrect time
we are having a piece of code where we are using NanoClock to get the exact time. In a nut shell below is the code snippet of how i am generating the nano time and how we are converting to simple date ...
0
votes
1
answer
245
views
STM8S003F3 tim2 configuration
I am using STM8S Cosmic C compiler, and I am trying to configure tim2 for 350 μs (350 μs should be the pulse width).
As per the reference manual, tim4 is a 16-bit with a prescaler factor of 32768. I ...
0
votes
1
answer
68
views
How to fix the non-updating clock on a tkinter weather app?
Clock on tkinter doesn't work
I created a weather app, but the clock just constantly stand still the time, how to fix it???
current = datetime.now(home)
real = current.strftime("%d/%m/%Y\n%H:%M:%...
0
votes
1
answer
376
views
C#: How can I make the clock work correctly?
I'm working on a new GitHub repository called Charms Bar Port using Visual Studio 2022 that requires the UI to show a clock and date at the lower left, as seen on this image.
However, the clock seems ...
1
vote
1
answer
833
views
clock_cast on gcc 12.2.1
I must use the utc_clock<> feature of C++20. Before, I was using the date library from Howard Hinnant date library but now I want to use the standard C++20 features (and not the date library).
...
2
votes
1
answer
2k
views
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 ...
3
votes
2
answers
2k
views
What precision is used by std::chrono::system_clock?
Here's some code that I found:
std::cout << std::chrono::system_clock::now().time_since_epoch().count() << std::endl;
This prints 1662563612364838407 for me; so it looks like this prints ...
-3
votes
1
answer
530
views
What does system_clock::now() value after seconds represent in C++ 20?
I'm exploring the timestamp in C++ 20 returned from system_clock::now() and when I print out the returned std::chrono::time_point it prints the date and time in the format YYYY-MM-DD HH:MM:SS.xxxxxxx....
0
votes
2
answers
121
views
If a computer changes geographic location, will the system clock still return the UTC accurately?
Suppose someone travels from a country with UTC to +/- X hr timezone. Their device such as a computer or a mobile, is completely switched off during this journey.
Upon reaching the destination, once ...