-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProcess.h
33 lines (29 loc) · 909 Bytes
/
Process.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// Created by tfinnegan on 12/9/19.
//
#ifndef OPERATING_SYSTEM_SIMULATOR_PROCESS_H
#define OPERATING_SYSTEM_SIMULATOR_PROCESS_H
#include <chrono>
#include <queue>
#include <tuple>
#include <string>
#include <chrono>
#include "Config.h"
using namespace std;
class Process {
private:
vector<tuple<char, string, int>> instruction_queue;
int time_remaining;
std::chrono::milliseconds cur_instruction_time_remaining;
public:
Process();
Process(queue<tuple<char, string, int>> * instructions, Config * program_config);
int getTimeRemaining() const;
void setCurTimeRemaining(std::chrono::milliseconds cur_instruction_time);
int getCurInsTimeRemaining();
tuple<char, string, int> getNextInstruction(Config * program_config);
void popEmptyInstruction(Config * program_config);
bool empty() const;
void suspend();
};
#endif //OPERATING_SYSTEM_SIMULATOR_PROCESS_H