Questions tagged [system-clock]
130 questions
0
votes
0 answers
Android - exchanging System. currentTimeMillis() for SystemClock.uptimeMillis() - what are the implications
i have tried to write the following function which given a time in the future will tell me how many milliseconds until that time:
fun millisFromNow(futureTime: Long): Long {
val now = Date(System.currentTimeMillis())
val endDate =…

j2emanue
- 60,549
- 65
- 286
- 456
0
votes
1 answer
Is there a way to get time and day in C++ without using the system clock?
The question may sound stupid, but here's my case: I have a C++ program on Jetson Nano (a Single Board Computer) and want to get current time and date. In my application however, I can't always connect the internet cable to the device. Although in…

Totemi1324
- 468
- 1
- 6
- 19
0
votes
1 answer
Converting time string to seconds in C++ issues
I'm writing a C++ application on an embedded ARM device running Embedded Linux.
I am trying to convert a date and time string to seconds, subtract it from the current time in seconds, and taking action if the number of seconds elapsed is greater…

Engineer999
- 3,683
- 6
- 33
- 71
0
votes
0 answers
Problems with SystemClock config for STM32L4R5
My initial project, generated on CubeMX was working on 32MHz. Since I am trying to implement an ADC with 80MHz I decided to increase the System Clock to 100MHz. The changes I made in the source are in the main.c:
void SystemClock_Config(void)
{
…

D. K.
- 63
- 1
- 5
0
votes
2 answers
STM32F407 Register Level Clock Configuration Issue
I am working on an STM32F407 Discovery Board. But I didn't solve my clock configuration problem. I want to 168 MHz working frequency and I get help from CubeMX Clock Configuration Manager. And this is my PLLCFGR Register value from CubeMX:…

RasimGök
- 1
- 2
- 7
0
votes
1 answer
AttributeError: module 'apscheduler.schedulers.asyncio' has no attribute 'get_event_loop'
I am trying to implement clock process to use in Heroku dyno. I am using Python 3.6. Clock process will run each 3 hours. This is the code:
import os
import sys
import requests
from apscheduler.schedulers import asyncio
from…

Matej J
- 615
- 1
- 9
- 33
0
votes
1 answer
Can anyone clarify: Is steady_clock trustworthy between threads in C++
Can anyone please confirm (or deny) whether the steady_clock is "trustworthy" between threads? According to the article Is the epoch of steady_clock relative to when the operating system starts? or to the process itself?, there was some discussion…

Weedware
- 141
- 1
- 9
0
votes
1 answer
Run a Virtual Machine faster than real-time
I'm trying to run a binary faster its' real-time execution, and assumed Virtual Box may have a way in doing so, based off of this 10-year old post.
I need to emulate Windows 10. Is this possible, on any VM out there?

Eric
- 444
- 7
- 19
0
votes
2 answers
PPS: how to adjust system clock from PPS?
In Linux PPS documentation it is said:
PPS means "pulse per second" and a PPS source is just a device which
provides a high precision signal each second so that an application
can use it to adjust system clock time.
But I haven't find out how…

ransh
- 1,589
- 4
- 30
- 56
0
votes
0 answers
How to get current unix epoch time in python that does not go backwards due to system clock backset
I am using python time module where I get the current unix time with time.time(). However, I am noticing that when I get current time and compare it to a previous time.time() call, the value is lower.
the alternative to this is to use…

bcsta
- 1,963
- 3
- 22
- 61
0
votes
2 answers
Generating system clock configuration for STM32F103C8 with CubeMX
I am trying to generate system_stm32f1xx.c which will set up my clock as shown on the picture.
The problem is that, when I generate the code with CubeMX, I don't get this configuration. Instead, I get the (I guess) default configuration with…

AC Voltage
- 339
- 3
- 9
0
votes
1 answer
Time Updating issue in javascript
In javascript there is object
new Date()
it gives current time and date that may be picked by system clock
But when i move time next hours why it should take approx 45 seconds to update time in javascript?
Example:- current time is 10:46 but when…

Tauqeer
- 19
- 1
0
votes
1 answer
stm32f4 clock configuration won't enable bits in PWR register
I've recently purchased a NUCLEO-F446RE board (an STM32F4 product) and I'm having major problems enabling bits in the PWR register.
My goal is to blink an LED using the timer and I'm trying to configure the HSI clock to a max system frequency of 180…

wait_wut
- 57
- 1
- 8
0
votes
1 answer
How to slave the audio clock to the system clock using ALSA?
I want to
make the audio clock to be a slave to the system clock or
use the system clock to drive the audio system instead of the audio clock.
Is this possible with ALSA?

Jan Deinhard
- 19,645
- 24
- 81
- 137
0
votes
1 answer
Getting time since epoch in milliseconds isn't outputting correctly
I've used the code from one of the answers on this forum but it's doesn't appear to be correct. I don't know if it's the code or the way I'm logging it.
unsigned long long int NQCTestInstance::getCurrentTimeInMs() {
unsigned long…

Dan
- 2,304
- 6
- 42
- 69