Skip to content

Commit

Permalink
Changed units
Browse files Browse the repository at this point in the history
  • Loading branch information
tainfante committed Jan 21, 2018
1 parent b2cc0f1 commit b0e933f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 42 deletions.
63 changes: 30 additions & 33 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified out/production/KCC_App/sample/Controller.class
Binary file not shown.
18 changes: 9 additions & 9 deletions src/sample/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,21 @@ public void onStartAction(ActionEvent actionEvent) {

private float calculateTime(long impulses) {
float time=impulses/(16*frequency);
if (time>1000){
time=time/1000;
units="s";
}
else if(time<1){
time=time*1000;
units="us";
if (time<0.000001){
time=time*1000000000;
units="ns";
}
else if(time<0.001){
time=time*1000000;
units="ns";
units="us";
}
else{
else if(time<1){
time=time*1000;
units="ms";
}
else{
units="s";
}
return time;
}

Expand Down

0 comments on commit b0e933f

Please sign in to comment.