2,068 questions
1 vote
0 answers
98 views
How can I efficiently share high-frequency tick data between two local C++ processes using shared memory?
I'm building a high-performance tick simulator in C++ that generates market-like ticks (up to 65,536 per second). Now, I want to send these ticks to another local process on the same Linux machine in ...
2 votes
1 answer
307 views
How does clock_gettime actually work in the kernel?
uint64_t getTimeLatencyNs() { struct timespec ts1; struct timespec ts2; clock_gettime(CLOCK_MONOTONIC_RAW, &ts1); clock_gettime(CLOCK_MONOTONIC_RAW, &ts2); return ((ts2....
0 votes
1 answer
195 views
C# analog clock on BackgroundImage
I simply need to show the clock on a panel with BackgroundImage, but still appears with black background, I set the innercolor and outercolor of the analog clock to transparent, I have been doing some ...
3 votes
1 answer
253 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
0 answers
53 views
How to connect a Python program to an external clock to achieve microsecond precision?
So, in my program I am trying to achieve microsecond precision, not only for counting purposes but also delays and sleep functions. I have tried all the functions like time.time or time....
13 votes
2 answers
533 views
Is it "legitimate" to define an std::chrono Clock which doesn't really offer a now() function?
I'm writing a C++ library, which works with data that has some time values in it - values that do not originate in the system the library runs on. I want to put such values in std::chrono::time_point'...
1 vote
0 answers
57 views
Socket with `SO_RCVTIMEO` option set returns `EGAIN` sooner than expected?
I'm working with sockets and attempting to read them with a timeout, using the SO_RCVTIMEO option, but I'm getting weird behavior that suggests to me I don't understand what's going on under the hood. ...
1 vote
1 answer
94 views
C++ clock() function stops at maximum value instead of rolling over - is this documented anywhere?
I've tried to research this as thoroughly as I could but cannot find where this is documented anywhere. If anyone is aware of a resource that describes this behavior that would be very helpful to me. ...
0 votes
0 answers
132 views
Is STM32 Cube IDE SystemClock_Config Code right?
` void SystemClock_Config(void) { LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) { } // PWR Clock Enable? // LL_PWR_SetRegulVoltageScaling(...
0 votes
0 answers
32 views
Isn't PWR activation required when setting the STM32 LL driver clock?
void SystemClock_Config(void) { LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); while(LL_FLASH_GetLatency() != LL_FLASH_LATENCY_4); #if 1 LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR); #...
0 votes
0 answers
108 views
Analog Clock WidgetKit. Keeping it updated
I am creating an app that contains a clock widget. I want to keep the widget updating preferable every second. I've had some luck creating a long timeline - but i'm still running into the throttling ...
0 votes
0 answers
46 views
SPI CLK is not changed by initializing the SPI Setup
I now access a peripheral device using the SPI interface on the Linux environment. Access to this device is okay. I want to change the SPI CLK, but it is not changed by the clk setting value. The ...
2 votes
0 answers
56 views
Generic clock consumer in the common clock framework
In my setup, there is a clock generator that use the common clock framework in the Linux kernel. The clock generator has an output clock that I would like to feed to an external connector. If I have ...
2 votes
1 answer
139 views
Undefined instruction MRS on bare metal
I want to run simple test code in C on the Renesas Synergy R7FS5D97E evaluation board (Cortex M4). I made a sample project + SDK and toolchain projects using official materials, successfully built and ...
-1 votes
2 answers
131 views
Verilog clock implementation gone wrong
I just started learning Verilog and made a system clock and its respective testbench, but it is getting stuck in an infinite loop in the testbench. Could you please help me? Below is the ...