--- /dev/null
+file_app = fopen('trace.txt','r');
+
+if file_app == -1
+ error('File trace.txt cannot be opened for reading!');
+end
+
+for i=1:1
+ readin = fgetl(file_app);
+end
+
+i = 1;
+timestamps=zeros(5,2);
+
+while 1
+ readin = fgetl(file_app);
+ a = textscan(readin, '%d %n','delimiter',':');
+ if(a{1,1} == 0)
+ break;
+ end
+ timestamps(i, 1) = a{1, 1};
+ timestamps(i, 2) = (a{1,2});
+ i=i+1;
+end
+
+timestamps_nr=size(timestamps,1);
+
+timestamps_diff=zeros(timestamps_nr/2,1);
+
+starts=zeros(timestamps_nr/2,1);
+ends=zeros(timestamps_nr/2,1);
+i=2;
+for j=1:timestamps_nr/2
+ timestamps_diff(j) = timestamps(i,2) - timestamps(i-1,2);
+ i = i + 2;
+end
+
+timestamps_diff = timestamps_diff.*1000000;
+
+fclose(file_app);
\ No newline at end of file