Popravil fileDevice.cpp tako da dejansko naredi datoteke, če še ne obstajajo

This commit is contained in:
Timon 2025-12-01 13:37:24 +01:00
parent 8222f8dd0a
commit 74cc571eef
270 changed files with 104 additions and 74 deletions

24
ass2/headers/cpu.h Normal file
View file

@ -0,0 +1,24 @@
#pragma once
#include "machine.h"
#include <atomic>
#include <thread>
#include <chrono>
class cpu {
private:
std::atomic<bool> running;
std::thread nitUre;
int hitrostKhz;
int operacijeNaTick;
machine *m;
public:
cpu(machine *m) : running(false), hitrostKhz(1), operacijeNaTick(10), m(m) {}
void start();
void stop();
bool isRunning();
void setSpeed(int kHz);
int getSpeed();
private:
void zankaUre();
};