Skip to content

Commit 56a0708

Browse files
committed
tools/thumbnailgen: Configurable fps
1 parent ce2a3ec commit 56a0708

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/thumbnailgen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ class Img_writer{
5757
};
5858

5959
int main(int argc, char **argv){
60-
if(argc != 3){
61-
fprintf(stderr, "Usage: %s <socket path> <output path>\n", argv[0]);
60+
if(argc != 4){
61+
fprintf(stderr, "Usage: %s <socket path> <output path> <fps>\n", argv[0]);
6262
return 1;
6363
}
6464

@@ -68,7 +68,7 @@ int main(int argc, char **argv){
6868
Img_writer img_writer;
6969

7070
using clock = std::chrono::steady_clock;
71-
auto frame_time = std::chrono::seconds(1);
71+
auto frame_time = std::chrono::duration_cast<clock::duration>(std::chrono::duration<double>(1 / std::stod(argv[3])));
7272
auto next_frame = clock::now();
7373

7474
while(true){

0 commit comments

Comments
 (0)