Re: [fpc-pascal] Getting Last User Input reliably
On 12/5/21 11:10 AM, James Richters via fpc-pascal wrote: So the only thing I need to consider is times of longer than 49.7 days without user input... because if it was exactly 50 days, it would look like 0.3 days as the first rollover would be forgotten. To take care of this I can just check it in my main program loop and keep updating my own datetime variable of last user input. i don't understand why you are keeping up with user input times by counting ticks... you said that one second accuracy is just fine so Keep It Simple, man, and don't over engineer it... grab the unix timestamp NOW each time they input something and store that... when you want to know how long it has been since their last input, just subtract lastUserInputTime from currentNow and you have your elapsed time... if you use a 32bit signed variable, you still have 17 years before you have to even think about a rollover... in this day in age, i'd use a 64bit signed variable along with the 64bit unix time routines and not worry about it for the next 292 billion years ;) -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list where it belongs!* ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Building fpc 3.2.2 from sources - which compiler to use for install?
I am building fpc 3.2.2 from sources on a Linux Mint x64 box. When I compile fpc inside the downloaded source folder I use this: make all FPC="$HOME/devel/fpc/ppcx64" The FPC compiler in this case is 3.2.0, which I have built earlier on another box. This works fine. Now I am at the next step and here I am unsure which FPC to specify: make install PREFIX="$HOME" FPC="$HOME/devel/fpc/ppcx64" or make install PREFIX="$HOME" FPC="$HOME/devel/fpc/3.2.2/compiler/ppcx64" I.e. should I use the newly compiled 3.2.2 in this step or the seed compiler, which is the previous version? -- Bo Berglund Developer in Sweden ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Building fpc 3.2.2 from sources - which compiler to use for install?
Op 6-12-2021 om 12:53 schreef Bo Berglund via fpc-pascal: I.e. should I use the newly compiled 3.2.2 in this step or the seed compiler, which is the previous version? New. See buildfaq. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Building fpc 3.2.2 from sources - which compiler to use for install?
On Mon, 6 Dec 2021 13:29:31 +0100, Marco van de Voort via fpc-pascal wrote: > >Op 6-12-2021 om 12:53 schreef Bo Berglund via fpc-pascal: >> >> >> I.e. should I use the newly compiled 3.2.2 in this step or the seed compiler, >> which is the previous version? >> >> >New. See buildfaq. I used this: make install PREFIX="$HOME" FPC="$HOME/devel/fpc/3.2.2/compiler/ppcx64" ln -sf "$HOME/lib/fpc/3.2.2/ppcx64" "$HOME/bin/ppcx64" make sourceinstall PREFIX="$HOME" FPC="$HOME/bin/ppcx64" Seems to have worked fine. Was able to continue with Lazarus using the $HOME/bin/ppcx64 compiler. -- Bo Berglund Developer in Sweden ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal