Oscar Schofield / Mbed 2 deprecated Elec350_OBS

Dependencies:   mbed

Revision:
7:1e9cd1481e80
Parent:
4:5d531bd3c4ea
Child:
8:ad8e2dd314a2
--- a/button.cpp	Thu Oct 22 10:47:08 2015 +0000
+++ b/button.cpp	Thu Oct 22 10:50:37 2015 +0000
@@ -1,5 +1,5 @@
 #include "button.h" //header file included
-#include "mbed.h"
+
 
 Button::Button(string s){
     if (s == "user"){
@@ -9,19 +9,4 @@
 
 bool Button::ifPressed(){
     return *pin;
-}
-
-float Button::Duration(){
-    Timer timer;
-    float duration = 0;
-    timer.reset();
-    while (duration==0){
-        while (*pin==1){
-            timer.start();
-        }
-        duration= 0.1*timer.read_ms();
-        timer.stop();
-    }
-    return duration;
-}
-    
\ No newline at end of file
+}
\ No newline at end of file