Is there a way to know how many hours or days we have spent coding on Matlab ?

조회 수: 12 (최근 30일)
Pierre Lonfat
Pierre Lonfat 2017년 6월 18일
댓글: Adam Danz 2023년 1월 15일
Even if it is passive activity (matlab opened but not used).
Thanks in advance for your answer!
Pierre

답변 (1개)

dpb
dpb 2017년 6월 18일
I'm sure there are some system monitors that could do that...they'd have to be running as system service or such.
You could also add some code to your startup and finish files that would read system clock on start and end and save the difference in a file and accumulate running totals there.
Or, there are timecard programs; some with ActiveX or other programming API interfaces that one could use altho would apear overkill...but maybe there's an ulterior objective here?
  댓글 수: 1
Adam Danz
Adam Danz 2023년 1월 15일
To expand on @dpb's idea, you could create a custom setting from your startup.m file that records the start timestamp and then retrieve the timestamp from your finish.m file to compute the amount of time that passed. Some caveats:
  • R2019b or later
  • If your startup file is called during your MATLAB session afte the initial startup, take care not to overwrite your initial timestamp.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by