From 258c2ab6b84b19c548a66996c3f675b3414e7f23 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Tue, 5 Jul 2022 22:38:36 -0500 Subject: [PATCH] Now write actual intervals instead of arbitrary values Co-authored-by: sigonasr2 --- main.c | 6 +++--- memovr | Bin 17096 -> 16344 bytes 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index f56c003..8ab20f7 100644 --- a/main.c +++ b/main.c @@ -63,14 +63,14 @@ int main(int argc,char**argv) { lseek(fd_proc_mem,addr,SEEK_SET); read(fd_proc_mem,buf,sizeof(unsigned int)); while (1) { - sprintf(buf,"%d",(int)val++); + sprintf(buf,"%d",(int)val); lseek(fd_proc_mem,addr,SEEK_SET); if (write(fd_proc_mem,buf,sizeof(unsigned int))==-1) { printf("Error while writing\n"); exit(1); } - printf("\nWrite %d",(int)val-1); - sleep(2); + printf("\nWrite %d",(int)val); + sleep(((double)interval/1000)); } free(buf); diff --git a/memovr b/memovr index 26c82ae3237c35a8476e359cde4afa7892ef34ec..c4f244b7f56d528c581cf65918196e38cd31b120 100755 GIT binary patch delta 2621 zcmZuzdrXs86uLXDirkAfuhe<`ZU6uK5gK!Nl8hQO#0mHcMd>{Zv^h%}6Os zQ=NLBLYmG?FbK7AIxaz%A2CWgi)D>$sRqsp=cy5Fid>~|n1quMr_iL(Eq(B0^(!V{ z)0y3UoztzWgs%z|SAT;8idL{E>1hwp<8^u<)4@Q#h4FaJ=G5=c_OC#JAB9NW9Ia%_?buaTM3F^CK?3;m) z@#F;30aYn}D!`=_kt!e~RR=Yx=^2By(y~+($zVgY9nlMMXzFlB>i)DVSwL4f%wh9g zXTR+V9)2{Z+(gK1n<+Ez2sZ&kYAw|c-&S9wy_F%yy}k$y{^;yaKAuj9GkE(urWEo2 z6OAJFNjxSZHt7&hE93|}`@(6?5L*x#`WJPBjxia|lHs!wJTAj}8Gc`aBYg+&CG{TC z%B)dl-N*(V4-p-6@~F1NNASyY^b~T8OO!31x+PH&iK>jJE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